Beispiel #1
0
        private string Get(ImplementationModifier implementation)
        {
            switch (implementation)
            {
            case ImplementationModifier.MultiFiles:
                return("partial ");

            default:
                return("");
            }
        }
Beispiel #2
0
 public static Method WithImplementation(this Method @this, ImplementationModifier value) => new Method(@this.Name,
                                                                                                        documentation: @this.Documentation,
                                                                                                        returnType: @this.ReturnType,
                                                                                                        @override: @this.Override,
                                                                                                        access: @this.Access,
                                                                                                        scope: @this.Scope,
                                                                                                        async: @this.Sync,
                                                                                                        implementation: value,
                                                                                                        parameters: @this.Parameters,
                                                                                                        body: @this.Body,
                                                                                                        attributes: @this.Attributes);
Beispiel #3
0
 public static Class WithImplementation(this Class @this, ImplementationModifier value) => new Class(@this.Name,
                                                                                                     documentation: @this.Documentation,
                                                                                                     innerTypes: @this.InnerTypes,
                                                                                                     scope: @this.Scope,
                                                                                                     access: @this.Access,
                                                                                                     implementation: value,
                                                                                                     parent: @this.Parent,
                                                                                                     constructors: @this.Constructors,
                                                                                                     fields: @this.Fields,
                                                                                                     events: @this.Events,
                                                                                                     properties: @this.Properties,
                                                                                                     methods: @this.Methods,
                                                                                                     interfaces: @this.Interfaces);
Beispiel #4
0
 public Class(string name, string documentation = null, ScopeModifier scope = ScopeModifier.Instance, AccessModifier access = AccessModifier.Public, ImplementationModifier implementation = ImplementationModifier.SingleFile, IType parent = null, Constructor[] constructors = null, Field[] fields = null, Event[] events = null, Property[] properties = null, IType[] innerTypes = null, Method[] methods = null, IType[] interfaces = null, Attribute[] attributes = null) : base(name, documentation, access, events, properties, methods, interfaces, attributes)
 {
     this.Parent         = parent;
     this.Fields         = fields ?? new Field[0];
     this.Scope          = scope;
     this.Implementation = implementation;
     this.Constructors   = constructors ?? new Constructor[0];
     this.InnerTypes     = innerTypes ?? new Class[0];
 }
Beispiel #5
0
 public Method(string name, string documentation = null, ScopeModifier scope = ScopeModifier.Instance, OverrideModifier @override = OverrideModifier.None, AccessModifier access = AccessModifier.Public, ImplementationModifier implementation = ImplementationModifier.SingleFile, SyncModifier async = SyncModifier.Synchronous, IType returnType = null, Parameter[] parameters = null, Body body = null, Attribute[] attributes = null)
 {
     this.Name           = name;
     this.Documentation  = documentation;
     this.Parameters     = parameters ?? new Parameter[0];
     this.Attributes     = attributes ?? new Attribute[0];
     this.Body           = body;
     this.ReturnType     = returnType;
     this.Sync           = async;
     this.Override       = @override;
     this.Scope          = scope;
     this.Access         = access;
     this.Implementation = implementation;
 }