Exemple #1
0
 public ObsoletedProperty(OdcmProperty odcmProperty) : base(odcmProperty)
 {
     Type = odcmProperty.IsCollection
         ? new Type(new Identifier("global::System.Collections.Generic", "IList"),
                    TypeService.GetPropertyType(odcmProperty))
         : TypeService.GetPropertyType(odcmProperty);
     UpdatedName = Name;
     Name        = NamesService.GetModelPropertyName(odcmProperty);
 }
Exemple #2
0
 public static Field ForStructuralProperty(OdcmProperty property)
 {
     return(new Field
     {
         Name = NamesService.GetPropertyFieldName(property),
         Type = property.IsCollection
             ? new Type(NamesService.GetExtensionTypeName("NonEntityTypeCollectionImpl"), new Type(NamesService.GetConcreteTypeName(property.Type)))
             : TypeService.GetPropertyType(property)
     });
 }
Exemple #3
0
 public static Parameter FromOdcmParameter(OdcmParameter odcmParameter)
 {
     return(new Parameter
     {
         Name = odcmParameter.Name,
         Description = odcmParameter.Description,
         Type = odcmParameter.IsCollection
             ? new Type(new Identifier("System.Collections.Generic", "ICollection"), new Type(NamesService.GetConcreteTypeName(odcmParameter.Type)))
             : TypeService.GetParameterType(odcmParameter)
     });
 }
Exemple #4
0
 protected StructuralProperty(OdcmProperty odcmProperty) : base(odcmProperty)
 {
     FieldName = NamesService.GetPropertyFieldName(odcmProperty);
     ModelName = NamesService.GetModelPropertyName(odcmProperty);
     Type      = TypeService.GetPropertyType(odcmProperty);
 }