public static Field ForFetcherNavigationCollectionProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetFetcherCollectionFieldName(property), Type = new Type(NamesService.GetCollectionTypeName((OdcmClass)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 Class ForCountableCollection(OdcmClass odcmClass) { return(new Class { AccessModifier = "internal ", Identifier = NamesService.GetCollectionTypeName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCountableCollectionInterface(odcmClass) }); }
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; }
public static Class ForCollection(OdcmEntityClass odcmClass) { return(new Class { AccessModifier = "internal ", BaseClass = new Type(NamesService.GetExtensionTypeName("QueryableSet"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))), Constructors = global::Vipr.Writer.CSharp.Lite.Constructors.ForCollection(odcmClass), Interfaces = global::Vipr.Writer.CSharp.Lite.ImplementedInterfaces.ForCollectionClass(odcmClass), Identifier = NamesService.GetCollectionTypeName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCollectionClass(odcmClass), Indexers = global::Vipr.Writer.CSharp.Lite.Indexers.ForCollection(odcmClass) }); }
private void Write(CollectionConstructor collectionConstructor) { _("internal {0}(global::Microsoft.OData.Client.DataServiceQuery inner," + "{1} context," + "object entity," + "string path)" + ": base(inner, context, entity as {2}, path)", NamesService.GetCollectionTypeName(collectionConstructor.OdcmClass).Name, NamesService.GetExtensionTypeName("DataServiceContextWrapper"), NamesService.GetExtensionTypeName("EntityBase")); _("{"); _("}"); }