Exemple #1
0
 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))) }
     });
 }
Exemple #2
0
        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());
        }