Example #1
0
 public BTInputProperty(FieldInfo field, BTVariableAttribute attr)
 {
     if (string.IsNullOrEmpty(attr.Name))
     {
         PropertyName = field.Name;
     }
     else
     {
         PropertyName = attr.Name;
     }
     if (string.IsNullOrEmpty(attr.TypePattern))
     {
         TypeName = field.FieldType.Name;
     }
     else
     {
         TypeName = attr.TypePattern;
     }
     if (string.IsNullOrEmpty(attr.DefaultVallue))
     {
         DefaultValue = DevilCfg.DefaultTypeValue(TypeName);
     }
     else
     {
         DefaultValue = attr.DefaultVallue;
     }
     InputData = DefaultValue;
 }
Example #2
0
 public BTInputProperty(string propertyName, string type)
 {
     PropertyName = propertyName;
     TypeName     = type;
     InputData    = DevilCfg.DefaultTypeValue(TypeName);
     DefaultValue = InputData;
 }