public static IEnumerable <Indexer> ForCollection(OdcmEntityClass odcmClass) { var retVal = new List <Indexer>(); foreach (var projection in odcmClass.DistinctProjections()) { retVal.Add(CollectionGetByIdIndexer.ForCollectionClass(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); }