obfuz/Editor/Virtualization/DataNodeBase.cs

38 lines
814 B
C#
Raw Normal View History

2025-04-20 14:23:40 +08:00
namespace Obfuz.Virtualization
{
public abstract class DataNodeBase : IDataNode
{
public DataNodeType Type { get; protected set; }
public IDataNode Expr { get; protected set; }
public abstract object Value { get; protected set; }
public abstract void Compile(CompileContext ctx);
}
public abstract class DataNodeBase<T> : DataNodeBase
{
public T Value2 { get; protected set; }
public override object Value
{
get => Value2;
protected set => Value2 = (T)value;
}
}
public abstract class DataNodeAny : DataNodeBase
{
private object _value;
2025-04-20 15:20:13 +08:00
2025-04-20 14:23:40 +08:00
public override object Value
{
get => _value;
protected set => _value = value;
}
}
}