Example #1
0
 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;
 }
Example #2
0
 internal Long(Reflect.Type type)
     : base(type)
 {
 }
Example #3
0
 public Method(MethodAttribute attribute, Reflect.Method backend, Object parent)
     : base(attribute, backend, parent)
 {
     this.Default = attribute.NotNull() ? attribute.Default : null;
     this.backend = backend;
 }
Example #4
0
 internal Pointer(Reflect.Type type)
     : base(type)
 {
 }
Example #5
0
 public StringInterface(Reflect.Type type)
     : base(type)
 {
 }
Example #6
0
 internal Integer(Reflect.Type type)
     : base(type)
 {
 }
Example #7
0
 internal Double(Reflect.Type type)
     : base(type)
 {
 }
Example #8
0
 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;
 }
Example #9
0
 public static Abstract Create(Reflect.Property property)
 {
     return Abstract.Create(property.Type);
 }
Example #10
0
 protected Abstract(Reflect.Type type)
 {
     this.Type = type;
 }
Example #11
0
 internal String(Reflect.Type type)
     : base(type)
 {
 }
Example #12
0
 internal TimeSpan(Reflect.Type type)
     : base(type)
 {
 }
Example #13
0
 internal Enumeration(Reflect.Type type)
     : base(type)
 {
 }
Example #14
0
 internal DateTime(Reflect.Type type)
     : base(type)
 {
 }
Example #15
0
 internal Boolean(Reflect.Type type)
     : base(type)
 {
 }