Ejemplo n.º 1
0
 public CodegenInnerClass(
     string className,
     CodegenCtor ctor,
     IList<CodegenTypedParam> explicitMembers,
     CodegenClassMethods methods,
     CodegenClassProperties properties)
 {
     ClassName = className.CodeInclusionTypeName();
     BaseList = new CodegenClassBaseList();
     Ctor = ctor;
     ExplicitMembers = explicitMembers;
     Methods = methods;
     Properties = properties;
 }
Ejemplo n.º 2
0
 public CodegenClass(
     CodegenClassType classType,
     Type optionalInterfaceImplemented,
     string className,
     CodegenClassScope codegenClassScope,
     IList<CodegenTypedParam> explicitMembers,
     CodegenCtor optionalCtor,
     CodegenClassMethods methods,
     CodegenClassProperties properties,
     IList<CodegenInnerClass> innerClasses)
     : this(classType, className, codegenClassScope, explicitMembers, optionalCtor, methods, properties, innerClasses)
 {
     BaseList.AssignType(optionalInterfaceImplemented);
 }
Ejemplo n.º 3
0
        private static void AddReferencedClasses(
            CodegenClassBaseList baseList,
            CodegenClassMethods methods,
            CodegenClassProperties properties,
            ISet<Type> classes)
        {
            baseList.AddReferenced(classes);

            methods.PublicMethods.ForEach(m => m.MergeClasses(classes));
            methods.PrivateMethods.ForEach(m => m.MergeClasses(classes));

            properties.PublicProperties.ForEach(m => m.MergeClasses(classes));
            properties.PrivateProperties.ForEach(m => m.MergeClasses(classes));
        }
Ejemplo n.º 4
0
 public CodegenInnerClass(
     string className,
     Type interfaceImplemented,
     CodegenCtor ctor,
     IList<CodegenTypedParam> explicitMembers,
     CodegenClassMethods methods,
     CodegenClassProperties properties)
 {
     ClassName = className;
     InterfaceImplemented = interfaceImplemented;
     Ctor = ctor;
     ExplicitMembers = explicitMembers;
     Methods = methods;
     Properties = properties;
 }
Ejemplo n.º 5
0
        private static void AddReferencedClasses(
            Type interfaceImplemented,
            CodegenClassMethods methods,
            CodegenClassProperties properties,
            ISet<Type> classes)
        {
            if (interfaceImplemented != null) {
                classes.AddToSet(interfaceImplemented);
            }

            methods.PublicMethods.ForEach(m => m.MergeClasses(classes));
            methods.PrivateMethods.ForEach(m => m.MergeClasses(classes));

            properties.PublicProperties.ForEach(m => m.MergeClasses(classes));
            properties.PrivateProperties.ForEach(m => m.MergeClasses(classes));
        }
Ejemplo n.º 6
0
 public CodegenInnerClass(
     string className,
     Type optionalInterfaceImplemented,
     CodegenCtor ctor,
     IList<CodegenTypedParam> explicitMembers,
     CodegenClassMethods methods,
     CodegenClassProperties properties)
     : this(className, ctor, explicitMembers, methods, properties)
 {
     if (optionalInterfaceImplemented != null) {
     }
     
     ClassName = className.CodeInclusionTypeName();
     BaseList.AssignType(optionalInterfaceImplemented);
     Ctor = ctor;
     ExplicitMembers = explicitMembers;
     Methods = methods;
     Properties = properties;
 }
Ejemplo n.º 7
0
        public CodegenClass(
            CodegenClassType classType,
            string className,
            CodegenClassScope codegenClassScope,
            IList<CodegenTypedParam> explicitMembers,
            CodegenCtor optionalCtor,
            CodegenClassMethods methods,
            CodegenClassProperties properties,
            IList<CodegenInnerClass> innerClasses)
        {
            BaseList = new CodegenClassBaseList();
            ClassType = classType;
            Namespace = codegenClassScope.NamespaceScope.Namespace;
            ClassName = className;
            OptionalCtor = optionalCtor;
            ExplicitMembers = explicitMembers;
            Methods = methods;
            Properties = properties;

            IList<CodegenInnerClass> allInnerClasses = new List<CodegenInnerClass>(innerClasses);
            allInnerClasses.AddAll(codegenClassScope.AdditionalInnerClasses);
            InnerClasses = allInnerClasses;
        }
Ejemplo n.º 8
0
        public CodegenClass(
            Type interfaceClass,
            string @namespace,
            string className,
            CodegenClassScope codegenClassScope,
            IList<CodegenTypedParam> explicitMembers,
            CodegenCtor optionalCtor,
            CodegenClassMethods methods,
            CodegenClassProperties properties,
            IList<CodegenInnerClass> innerClasses)
        {
            Namespace = @namespace;
            ClassName = className;
            InterfaceImplemented = interfaceClass;
            OptionalCtor = optionalCtor;
            ExplicitMembers = explicitMembers;
            Methods = methods;
            Properties = properties;

            IList<CodegenInnerClass> allInnerClasses = new List<CodegenInnerClass>(innerClasses);
            allInnerClasses.AddAll(codegenClassScope.AdditionalInnerClasses);
            InnerClasses = allInnerClasses;
        }