public CSClass(CSVisibility vis, CSIdentifier name, IEnumerable <CSMethod> methods = null,
                       bool isStatic = false, bool isSealed = false)
        {
            Visibility         = vis;
            IsStatic           = isStatic;
            IsSealed           = isSealed;
            Name               = Exceptions.ThrowOnNull(name, "name");
            Inheritance        = new CSInheritance();
            Delegates          = new List <CSDelegateTypeDecl> ();
            Fields             = new List <ICodeElement> ();
            Constructors       = new List <CSMethod> ();
            Methods            = new List <CSMethod> ();
            Properties         = new List <CSProperty> ();
            InnerClasses       = new CSClasses();
            InnerEnums         = new List <CSEnum> ();
            StaticConstructor  = new CSCodeBlock();
            GenericParams      = new CSGenericTypeDeclarationCollection();
            GenericConstraints = new CSGenericConstraintCollection();

            if (methods != null)
            {
                Methods.AddRange(methods);
            }
        }
Exemple #2
0
 public CSFileBasic(string nameSpace)
 {
     this.nameSpace = Exceptions.ThrowOnNull(nameSpace, "nameSpace");
     Using          = new CSUsingPackages();
     Classes        = new CSClasses();
 }