public ContainerNameFromTypeMethod(OdcmClass odcmContainer)
 {
     ClientNamespace = NamesService.GetNamespaceName(odcmContainer.Namespace);
     Visibility      = Visibility.Private;
     Name            = "ResolveNameFromType";
     Parameters      = new[] { new Parameter(new Type(new Identifier("global::System", "Type")), "clientType"), };
     ReturnType      = new Type(new Identifier("System", "String"));
     ServerNamespace = odcmContainer.Namespace.Name;
 }
Esempio n. 2
0
 public Namespace(OdcmNamespace @namespace, OdcmModel model)
 {
     Name = NamesService.GetNamespaceName(@namespace);
     //Features = @namespace.Enums.SelectMany(global::Vipr.Writer.CSharp.Features.ForOdcmEnum)
     //    .Concat(@namespace.Classes.SelectMany(global::Vipr.Writer.CSharp.Features.ForOdcmClass))
     //    .Concat(@namespace.Classes.SelectMany(c => global::Vipr.Writer.CSharp.Features.ForEntityContainer(c, model)));
     Features = @namespace.Enums.SelectMany(global::Vipr.Writer.CSharp.Features.ForOdcmEnum)
                .Concat(@namespace.Classes.OfType <OdcmComplexClass>().SelectMany(global::Vipr.Writer.CSharp.Features.ForOdcmClass))
                .Concat(@namespace.Classes.OfType <OdcmEntityClass>().SelectMany(global::Vipr.Writer.CSharp.Features.ForOdcmClass))
                .Concat(@namespace.Classes.OfType <OdcmServiceClass>().SelectMany(c => global::Vipr.Writer.CSharp.Features.ForEntityContainer(c, model)));
 }
Esempio n. 3
0
 public static Interface ForEntityContainer(OdcmClass odcmContainer)
 {
     return(new Interface
     {
         Identifier = NamesService.GetEntityContainerInterfaceName(odcmContainer),
         Description = odcmContainer.Description,
         Interfaces = null,
         Methods = global::Vipr.Writer.CSharp.Methods.ForEntityContainerInterface(odcmContainer),
         Properties = global::Vipr.Writer.CSharp.Properties.ForEntityContainerInterface(odcmContainer),
         Namespace = NamesService.GetNamespaceName(odcmContainer.Namespace),
     });
 }
Esempio n. 4
0
 public static Interface ForCollection(OdcmEntityClass odcmClass)
 {
     return(new Interface
     {
         Attributes = global::Vipr.Writer.CSharp.Attributes.ForCollectionInterface,
         Identifier = NamesService.GetCollectionInterfaceName(odcmClass),
         Namespace = NamesService.GetNamespaceName(odcmClass.Namespace),
         Methods = global::Vipr.Writer.CSharp.Methods.ForCollectionInterface(odcmClass),
         Indexers = IndexerSignature.ForCollectionInterface(odcmClass),
         Interfaces = new[] { new Type(NamesService.GetExtensionTypeName("IReadOnlyQueryableSetBase"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))) }
     });
 }
Esempio n. 5
0
 public static Interface ForFetcher(OdcmClass odcmClass)
 {
     return(new Interface
     {
         Attributes = global::Vipr.Writer.CSharp.Attributes.ForFetcherInterface,
         Identifier = NamesService.GetFetcherInterfaceName(odcmClass),
         Interfaces = global::Vipr.Writer.CSharp.ImplementedInterfaces.ForFetcherInterface(odcmClass),
         Methods = global::Vipr.Writer.CSharp.Methods.ForFetcherInterface(odcmClass),
         Namespace = NamesService.GetNamespaceName(odcmClass.Namespace),
         Properties = global::Vipr.Writer.CSharp.Properties.ForFetcherInterface(odcmClass)
     });
 }
Esempio n. 6
0
 public static Interface ForConcrete(OdcmClass odcmClass)
 {
     return(new Interface
     {
         Attributes = global::Vipr.Writer.CSharp.Attributes.ForConcreteInterface,
         Identifier = NamesService.GetConcreteInterfaceName(odcmClass),
         Description = odcmClass.Description,
         Methods = global::Vipr.Writer.CSharp.Methods.ForConcreteInterface(odcmClass),
         Namespace = NamesService.GetNamespaceName(odcmClass.Namespace),
         Properties = global::Vipr.Writer.CSharp.Properties.ForConcreteInterface(odcmClass),
         Interfaces = global::Vipr.Writer.CSharp.ImplementedInterfaces.ForConcreteInterface(odcmClass)
     });
 }