public static CollectionGetByIdMethod ForCollectionClass(OdcmClass odcmClass, OdcmProjection projection = null) { return(new CollectionGetByIdMethod(odcmClass, projection) { DefiningInterface = NamesService.GetCollectionInterfaceName(odcmClass, projection) }); }
public static CollectionGetByIdIndexer ForCollectionClass(OdcmEntityClass odcmClass, OdcmProjection projection) { return(new CollectionGetByIdIndexer(odcmClass, projection) { DefiningInterface = NamesService.GetCollectionInterfaceName(odcmClass, projection) }); }
public static Interface ForCountableCollection(OdcmClass odcmClass) { return(new Interface { Identifier = NamesService.GetCollectionInterfaceName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCountableCollectionInterface(odcmClass) }); }
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 IEnumerable <Type> ForCollectionClass(OdcmClass odcmClass) { var retVal = new List <Type>(); foreach (var projection in odcmClass.DistinctProjections()) { retVal.Add(new Type(NamesService.GetCollectionInterfaceName(odcmClass, projection))); } return(retVal); }
public static IEnumerable <Interface> ForCollection(OdcmEntityClass odcmClass) { var interfaces = new List <Interface>(); foreach (var projection in odcmClass.DistinctProjections()) { var @interface = new Interface { Attributes = global::Vipr.Writer.CSharp.Lite.Attributes.ForCollectionInterface, Identifier = NamesService.GetCollectionInterfaceName(odcmClass, projection), Namespace = NamesService.GetNamespaceName(odcmClass.Namespace), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCollectionInterface(odcmClass, projection), Indexers = IndexerSignature.ForCollectionInterface(odcmClass, projection), Interfaces = new[] { new Type(NamesService.GetExtensionTypeName("IReadOnlyQueryableSetBase"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))) } }; interfaces.Add(@interface); } return(interfaces); }