//Является типом public bool LessOrEquals(ITablikType type) { if (!(type is SimpleType)) { return(false); } return(ArrayType == type.Simple.ArrayType && DataType.LessOrEquals(type.DataType)); }
//Данный параметр является наследником указанного типа public bool LessOrEquals(ITablikType type) { if (type is TablikCalcParam) { return(((TablikCalcParam)Type).LessOrEquals(type) || BaseParams.Any(bp => bp.LessOrEquals(type))); } if (type is ITablikSignalType) { return(TablikSignalType.LessOrEquals(type)); } return(Simple.LessOrEquals(type)); }
//Является типом public override bool LessOrEquals(ITablikType type) { if (type is BaseObjectType) { return(this == type); } if (type is SimpleType) { Simple.LessOrEquals(type); } return(false); }
//Сложение типов данных internal static ITablikType Add(this ITablikType t1, ITablikType t2) { if (t1 == null) { return(t2); } if (t2 == null) { return(t1); } if (t1.LessOrEquals(t2)) { return(t2); } if (t2.LessOrEquals(t1)) { return(t1); } var ts1 = t1.TablikSignalType; var ts2 = t2.TablikSignalType; if (ts1 != null && ts2 != null) { if (ts1.LessOrEquals(ts2)) { return(ts2); } if (ts2.LessOrEquals(ts1)) { return(ts1); } } return(t1.Simple.ArrayType == t2.Simple.ArrayType ? new SimpleType(t1.DataType.Add(t2.DataType), t1.Simple.ArrayType) : new SimpleType()); }
public TablikVar(string code, ITablikType type = null, Mean defaultValue = null) { Code = code; Type = type; DefaultValue = defaultValue; }
public bool LessOrEquals(ITablikType type) { return(Simple.LessOrEquals(type)); }
//Определение расчетного типа данных public void DefineType() { Type = new SimpleType(DataType); }
//Является типом public bool LessOrEquals(ITablikType type) { return(ObjectType.LessOrEquals(type)); }
public abstract bool LessOrEquals(ITablikType type);