public T_DictionaryType(T_Type key, T_Type value) { this.KeyType = key; this.ValueType = value; this.NullAble = true; this.Enumerable = true; }
public T_DictionaryType(T_Type key, T_Type value) { this.KeyType = key; this.ValueType = value; this.NullAble = true; this.Enumerable = true; }
public static void Regist(T_Type type) { if (!Types.ContainsKey(type.Name)) { Types.Add(type.Name, type); } }
public virtual T_Type ChangeType(T_Type to) { if (to.Name == this.Name) { return(this); } return(null); }
public virtual bool CanChangeType(T_Type to) { if (this.Name == to.Name) { return(true); } return(false); }
public bool Equals(T_Type p) { // If parameter is null return false: if ((object)p == null) { return(false); } // Return true if the fields match: return(this.Name == p.Name); }
public T_InputType(T_Type valueType) { var type = "unknown"; if (valueType != null) { type = valueType.Name; } this.Name = string.Format("Input<{0}>", type); this.Value = new T_Field() { Name = "Value", Type = valueType }; this.Visible = new T_Field() { Name = "Visible", Type = T_Type.Boolean }; this.Enabled = new T_Field() { Name = "Enabled", Type = T_Type.Boolean }; this.Changed = new T_Field() { Name = "Changed", Type = new T_EventType("Changed") }; this.Validation = new T_Field() { Name = "Validation", Type = new T_ValidateType() }; this.Fields.Add(this.Visible); this.Fields.Add(this.Value); this.Fields.Add(this.Enabled); this.Fields.Add(this.Changed); this.Fields.Add(this.Validation); this.Methods.Add(new T_Method() { Name = "Value", Type = valueType }); this.Methods.Add(new T_Method() { Name = "Visible", Type = T_Type.Boolean }); this.Methods.Add(new T_Method() { Name = "Enabled", Type = T_Type.Boolean }); }
//public T_Type Index(int index) internal T_ListType(T_Type valueType) : base() { this.ItemType = valueType; this.Name = string.Format("List<{0}>", valueType.Name); var get = new T_Method() { Name = "Get", Type = ItemType }; //get.Parameters.Add(new T_Parameter(){ Name}); this.Methods.Add(get); this.NullAble = true; this.Enumerable = true; }
public override bool Equals(System.Object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to Point return false. T_Type p = obj as T_Type; if ((System.Object)p == null) { return(false); } // Return true if the fields match: return(this.Name == p.Name); }
public T_InputType(T_Type valueType) { var type = "unknown"; if (valueType != null) type = valueType.Name; this.Name = string.Format("Input<{0}>", type); this.Value = new T_Field() { Name = "Value", Type = valueType }; this.Visible = new T_Field() { Name = "Visible", Type = T_Type.Boolean }; this.Enabled = new T_Field() { Name = "Enabled", Type = T_Type.Boolean }; this.Changed = new T_Field() { Name = "Changed", Type = new T_EventType("Changed") }; this.Validation = new T_Field() {Name="Validation",Type = new T_ValidateType() }; this.Fields.Add(this.Visible); this.Fields.Add(this.Value); this.Fields.Add(this.Enabled); this.Fields.Add(this.Changed); this.Fields.Add(this.Validation); this.Methods.Add(new T_Method() { Name = "Value", Type = valueType }); this.Methods.Add(new T_Method() { Name = "Visible", Type = T_Type.Boolean }); this.Methods.Add(new T_Method() { Name = "Enabled", Type = T_Type.Boolean }); }
//public T_Type Index(int index) internal T_ListType(T_Type valueType) : base() { this.ItemType = valueType; this.Name = string.Format("List<{0}>",valueType.Name); var get = new T_Method() { Name = "Get", Type = ItemType}; //get.Parameters.Add(new T_Parameter(){ Name}); this.Methods.Add(get); this.NullAble = true; this.Enumerable = true; }
public override bool CanChangeType(T_Type to) { return(base.CanChangeType(to)); }
public static void Regist(T_Type type) { if (!Types.ContainsKey(type.Name)) { Types.Add(type.Name, type); } }
public virtual T_Type RenderView(StringBuilder builder, List <string> call_stack, StringBuilder paras, AssignOperatorInfo?op, StringBuilder opValue, PostfixPartType?postfixPartType, StringBuilder func_paras, StringBuilder index_para) { //if(call_stack == null) var member = call_stack[0]; AssignOperatorInfo?op2 = null; StringBuilder opValue2 = null; if (call_stack.Count == 1) { op2 = op; opValue2 = opValue; } T_Type nextType = null; if (!this.IsInstance) { foreach (var f in this.Static_Fields) { if (f.Name == member) { this.RenderView(builder, f, op2, opValue2); nextType = f.Type; break; } } if (nextType == null) { foreach (var m in this.Static_Methods) { if (m.Name == member) { this.RenderView(builder, m, paras); nextType = m.Type; break; } } } } else { foreach (var f in this.Fields) { if (f.Name == member) { this.RenderView(builder, f, op2, opValue2); nextType = f.Type; break; } } if (nextType == null) { foreach (var m in this.Methods) { if (m.Name == member) { this.RenderView(builder, m, paras); nextType = m.Type; break; } } } } if (call_stack.Count > 1) { //var call_stack2 = new List<string>(); //call_stack2.AddRange(call_stack); //call_stack2.RemoveAt(0); return(nextType.RenderView(builder, call_stack.SubList(1), paras, op, opValue, postfixPartType, func_paras, index_para)); } return(nextType); }
public virtual bool CanChangeType(T_Type to) { if (this.Name == to.Name) return true; return false; }
public override bool CanChangeType(T_Type to) { return base.CanChangeType(to); }
public virtual T_Type ChangeType(T_Type to) { if (to.Name == this.Name) return this; return null; }
public bool Equals(T_Type p) { // If parameter is null return false: if ((object)p == null) { return false; } // Return true if the fields match: return this.Name == p.Name; }