public static Abstract Create(Reflect.Parameter parameter) { Abstract result; if ((result = Abstract.Create(parameter.Type)).NotNull()) { ParameterAttribute[] attributes = parameter.GetAttributes<ParameterAttribute>(); if (attributes.NotEmpty()) { result.Name = attributes[0].Name; result.Description = attributes[0].Description; result.Usage = attributes[0].Usage; } else result.Name = parameter.Name; } return result; }
internal Long(Reflect.Type type) : base(type) { }
public Method(MethodAttribute attribute, Reflect.Method backend, Object parent) : base(attribute, backend, parent) { this.Default = attribute.NotNull() ? attribute.Default : null; this.backend = backend; }
internal Pointer(Reflect.Type type) : base(type) { }
public StringInterface(Reflect.Type type) : base(type) { }
internal Integer(Reflect.Type type) : base(type) { }
internal Double(Reflect.Type type) : base(type) { }
public static Abstract Create(Reflect.Type type) { Abstract result = null; if (type == typeof(bool)) result = new Boolean(type); else if (type == typeof(string)) result = new String(type); else if (type.Inherits<Enum>()) result = new Enumeration(type); else if (type == typeof(System.TimeSpan)) result = new TimeSpan(type); else if (type == typeof(System.DateTime)) result = new DateTime(type); else if (StringCastable.IsStringCastable(type)) result = new StringCastable(type); else if (type == typeof(int)) result = new Integer(type); else if (type == typeof(long)) result = new Long(type); else if (type == typeof(float)) result = new Single(type); else if (type == typeof(double)) result = new Double(type); else if (type.Implements<IString>()) result = new StringInterface(type); else if (type == typeof(IntPtr)) result = new Pointer(type); return result; }
public static Abstract Create(Reflect.Property property) { return Abstract.Create(property.Type); }
protected Abstract(Reflect.Type type) { this.Type = type; }
internal String(Reflect.Type type) : base(type) { }
internal TimeSpan(Reflect.Type type) : base(type) { }
internal Enumeration(Reflect.Type type) : base(type) { }
internal DateTime(Reflect.Type type) : base(type) { }
internal Boolean(Reflect.Type type) : base(type) { }