protected ConcreteNavigationProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetPropertyFieldName(odcmProperty); FieldType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(NamesService.GetConcreteInterfaceName(odcmProperty.Type)); PrivateSet = true; }
protected ConcreteNavigationAccessorProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetPropertyFieldName(odcmProperty); InstanceType = NamesService.GetFetcherTypeName(odcmProperty.Type); FieldType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(NamesService.GetConcreteTypeName(odcmProperty.Type)); }
public static Field ForNavigationProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetPropertyFieldName(property), Type = new Type(NamesService.GetConcreteTypeName(property.Type)) }); }
protected FetcherNavigationCollectionProperty(OdcmProperty odcmProperty) : base(odcmProperty) { CollectionType = new Type(NamesService.GetCollectionTypeName((OdcmClass)odcmProperty.Projection.Type)); FieldName = NamesService.GetFetcherCollectionFieldName(odcmProperty); InstanceType = NamesService.GetConcreteTypeName(odcmProperty.Projection.Type); Type = new Type(NamesService.GetCollectionInterfaceName((OdcmClass)odcmProperty.Projection.Type, odcmProperty.Projection)); }
public static Parameter FromProperty(OdcmProperty arg) { return(new Parameter { Name = arg.Name.ToLowerCamelCase(), Type = new Type(NamesService.GetConcreteTypeName(arg.Type)) }); }
public ObsoletedNavigationProperty(OdcmProperty odcmProperty) : base(odcmProperty) { Type = odcmProperty.IsCollection ? new Type(new Identifier("global::System.Collections.Generic", "IList"), new Type(NamesService.GetConcreteTypeName(odcmProperty.Type))) : new Type(NamesService.GetConcreteTypeName(odcmProperty.Type)); IsCollection = odcmProperty.IsCollection; }
public EnsureQueryMethod(OdcmClass odcmClass) { Visibility = Visibility.Private; Name = "EnsureQuery"; FetchedType = new Type(NamesService.GetConcreteTypeName(odcmClass)); FetchedTypeInterface = new Type(NamesService.GetConcreteInterfaceName(odcmClass)); ReturnType = new Type(NamesService.GetExtensionTypeName("IReadOnlyQueryableSet"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))); }
public static Field ForConcreteNavigationCollectionProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetConcreteFieldName(property), Type = new Type(new Identifier("global::System.Collections.Generic", "List"), new Type(NamesService.GetConcreteTypeName(property.Type))) }); }
private ConcreteNavigationCollectionAccessorProperty(OdcmProperty odcmProperty) : base(odcmProperty) { CollectionType = new Type(NamesService.GetCollectionTypeName((OdcmClass)odcmProperty.Type)); FieldName = NamesService.GetConcreteFieldName(odcmProperty); InstanceType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(new Identifier("global::System.Collections.Generic", "IList"), new Type(NamesService.GetConcreteTypeName(odcmProperty.Type))); PrivateSet = true; }
private void Write(CollectionGetByIdMethod method) { WriteSignature(method); using (_builder.IndentBraced) { _("return GetFetcherById<{0}, {1}>((i) => {2});", NamesService.GetConcreteTypeName(method.OdcmClass), NamesService.GetFetcherTypeName(method.OdcmClass), method.ParameterToPropertyMap.ToEquivalenceString("i")); } }
public static Class ForComplex(OdcmClass odcmClass) { return(new Class { AbstractModifier = odcmClass.IsAbstract ? "abstract " : string.Empty, AccessModifier = "public ", Constructors = global::Vipr.Writer.CSharp.Lite.Constructors.ForComplex(odcmClass), BaseClass = new Type(odcmClass.Base == null ? NamesService.GetExtensionTypeName("ComplexTypeBase") : NamesService.GetPublicTypeName(odcmClass.Base)), Description = odcmClass.Description, Fields = global::Vipr.Writer.CSharp.Lite.Fields.ForComplex(odcmClass), Identifier = NamesService.GetConcreteTypeName(odcmClass), Properties = global::Vipr.Writer.CSharp.Lite.Properties.ForComplex(odcmClass), }); }
public static IEnumerable <Constructor> ForConcrete(OdcmClass odcmClass) { var classIdentifier = NamesService.GetConcreteTypeName(odcmClass); return(DefaultOnly(odcmClass, classIdentifier)); }
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 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) }); }
public EntityInstanceFunctionMethod(OdcmMethod odcmMethod) : base(odcmMethod) { InstanceName = NamesService.GetConcreteTypeName(odcmMethod.ReturnType); ReturnType = Type.TaskOf(new Type(NamesService.GetPublicTypeName(odcmMethod.ReturnType))); }