Example #1
0
 private static string NameOfField(SimpleFieldDescription field)
 {
     if (field.IsBackingField)
     {
         return(field.AsPropertyName());
     }
     return(field.Name);
 }
Example #2
0
        internal static IEnumerable <SimpleFieldDescription> CreateArrayField(ITypeDescription type)
        {
            var arrayType = ArrayDescription.Create(type, 1);

            return(new[] { SimpleFieldDescription.Create(FieldName, arrayType) });
        }
Example #3
0
 private static ExplorerItem ToExplorerItem(SimpleFieldDescription field)
 {
     return(new ExplorerItem(NameOfField(field) + ":" + field.Type.Name,
                             ExplorerItemKind.Property, ExplorerIcon.Column));
 }
Example #4
0
 internal static IEnumerable <SimpleFieldDescription> CreateField(string fieldName,
                                                                  ITypeDescription type)
 {
     return(new[] { SimpleFieldDescription.Create(fieldName, type) });
 }