Example #1
0
        public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass)
            where T : struct, IConvertible
        {
            ISection returnValue       = null;
            var      buildSectionValue = (eBuildSectionEntityPartial)(object)buildSection;

            switch (buildSectionValue)
            {
            case eBuildSectionEntityPartial.UsingStatements:
            {
                returnValue = new SectionUsingStatements <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.Namespace:
            {
                returnValue = new SectionNamespace <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.Class:
            {
                returnValue = new SectionClass <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.Properties:
            {
                returnValue = new SectionProperties <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.PrivateMethods:
            {
                returnValue = new SectionPrivateMethods <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.InternalClasses:
            {
                returnValue = new SectionInternalClasses <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.ClassClose:
            {
                returnValue = new SectionClassClose <T>(pass);
                break;
            }

            case eBuildSectionEntityPartial.NamespaceClose:
            {
                returnValue = new SectionNamespaceClose <T>(pass);
                break;
            }
            }

            return(returnValue);
        }
Example #2
0
        public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass)
            where T : struct, IConvertible
        {
            ISection returnValue       = null;
            var      buildSectionValue = (eBuildSectionEntity)(object)buildSection;

            switch (buildSectionValue)
            {
            case eBuildSectionEntity.UsingStatements:
            {
                returnValue = new SectionUsingStatements <T>(pass);
                break;
            }

            case eBuildSectionEntity.Namespace:
            {
                returnValue = new SectionNamespace <T>(pass);
                break;
            }

            case eBuildSectionEntity.Attributes:
            {
                returnValue = new SectionAttributes <T>(pass);
                break;
            }

            case eBuildSectionEntity.Class:
            {
                returnValue = new SectionClass <T>(pass);
                break;
            }

            case eBuildSectionEntity.Fields:
            {
                returnValue = new SectionFields <T>(pass);
                break;
            }

            case eBuildSectionEntity.Constructors:
            {
                returnValue = new SectionConstructors <T>(pass);
                break;
            }

            case eBuildSectionEntity.Properties:
            {
                returnValue = new SectionProperties <T>(pass);
                break;
            }

            case eBuildSectionEntity.IValidatable:
            {
                returnValue = new SectionIValidatable <T>(pass);
                break;
            }

            case eBuildSectionEntity.PublicMethods:
            {
                returnValue = new SectionPublicMethods <T>(pass);
                break;
            }

            case eBuildSectionEntity.PrivateMethods:
            {
                returnValue = new SectionPrivateMethods <T>(pass);
                break;
            }

            case eBuildSectionEntity.ClassClose:
            {
                returnValue = new SectionClassClose <T>(pass);
                break;
            }

            case eBuildSectionEntity.NamespaceClose:
            {
                returnValue = new SectionNamespaceClose <T>(pass);
                break;
            }
            }

            return(returnValue);
        }
        public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass)
            where T : struct, IConvertible
        {
            ISection returnValue       = null;
            var      buildSectionValue = (eBuildSectionContext)(object)buildSection;

            switch (buildSectionValue)
            {
            case eBuildSectionContext.UsingStatements:
            {
                returnValue = new SectionUsingStatements <T>(pass);
                break;
            }

            case eBuildSectionContext.Namespace:
            {
                returnValue = new SectionNamespace <T>(pass);
                break;
            }

            case eBuildSectionContext.Class:
            {
                returnValue = new SectionClass <T>(pass);
                break;
            }

            case eBuildSectionContext.Fields:
            {
                returnValue = new SectionEmpty <T>(pass);
                break;
            }

            case eBuildSectionContext.Constructors:
            {
                returnValue = new SectionConstructors <T>(pass);
                break;
            }

            case eBuildSectionContext.Properties:
            {
                returnValue = new SectionProperties <T>(pass);
                break;
            }

            case eBuildSectionContext.ProtectedMethods:
            {
                returnValue = new SectionProtectedMethods <T>(pass);
                break;
            }

            case eBuildSectionContext.PublicMethods:
            {
                returnValue = new SectionEmpty <T>(pass);
                break;
            }

            case eBuildSectionContext.PrivateMethods:
            {
                returnValue = new SectionPrivateMethods <T>(pass);
                break;
            }

            case eBuildSectionContext.ClassClose:
            {
                returnValue = new SectionClassClose <T>(pass);
                break;
            }

            case eBuildSectionContext.NamespaceClose:
            {
                returnValue = new SectionNamespaceClose <T>(pass);
                break;
            }
            }

            return(returnValue);
        }