public static Interface ForCollection(OdcmClass odcmClass) { return(new Interface { Attributes = new[] { Attribute.ForLowerCaseProperty() }, Identifier = NamesService.GetCollectionInterfaceName(odcmClass), Namespace = odcmClass.Namespace, Methods = global::CSharpWriter.Methods.ForCollectionInterface(odcmClass), Indexers = IndexerSignature.ForCollectionInterface(odcmClass), Interfaces = new[] { new Type(NamesService.GetExtensionTypeName("IReadOnlyQueryableSetBase"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))) } }); }
private void WriteSignature(IndexerSignature indexer, bool? @public = true) { var accessModifier = @public.HasValue ? @public.Value ? "public" : "private" : ""; _("{0} {1} this[{2}]", accessModifier, indexer.ReturnType, indexer.Parameters.ToParametersString()); }