bracket system
This commit is contained in:
@@ -10,7 +10,12 @@ namespace Nocturnis.DataStructures;
|
||||
public class DataCache : CacheItem<DataVariable>
|
||||
{
|
||||
public new static DataCache Null => new (x => (null, DataTypeConstant.BaseDataTypes.Null));
|
||||
public DataCache(Func<CacheItem, DataVariable> rec) : base(rec) => throw new Exception("CONSTRUCTION NOT ALLOWED");
|
||||
|
||||
public DataCache(Func<CacheItem, DataVariable> rec)
|
||||
{
|
||||
Value = new DataVariable();
|
||||
ProxyCalculator = c => (rec(c).Data, rec(c).Type);
|
||||
}
|
||||
|
||||
public DataCache(Func<CacheItem, (object, DataType)> rec)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user