Beispiel #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;
 }
Beispiel #2
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));
        }
Beispiel #3
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;
        }