public static Parameter FromOdcmParameter(OdcmParameter odcmParameter) { return(new Parameter { Name = odcmParameter.Name, Type = odcmParameter.IsCollection ? new Type(new Identifier("System.Collections.Generic", "ICollection"), new Type(NamesService.GetConcreteTypeName(odcmParameter.Type))) : TypeService.GetParameterType(odcmParameter) }); }
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) }); }
public CSharpWriter(OdcmModel model, IConfigurationProvider configurationProvider) { Model = model; ConfigurationService.Initialize(configurationProvider); TypeService.Initialize(Model); if (model.ServiceType == ServiceType.ODataV4) { _dependencies.Add("global::Microsoft.OData.Client"); _dependencies.Add("global::Microsoft.OData.Edm"); _dependencies.Add("System"); _dependencies.Add("System.Collections.Generic"); _dependencies.Add("System.ComponentModel"); _dependencies.Add("System.Linq"); _dependencies.Add("System.Reflection"); } }
protected StructuralProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetPropertyFieldName(odcmProperty); Type = TypeService.GetPropertyType(odcmProperty); }