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

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

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

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

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

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

            case eBuildSectionControllerMvc.ActionMethods:
            {
                returnValue = new SectionActionMethods <T>(pass);
                break;
            }

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

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

            return(returnValue);
        }
Beispiel #2
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);
        }
        public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass)
            where T : struct, IConvertible
        {
            ISection returnValue       = null;
            var      buildSectionValue = (eBuildSectionAutoMapperProfile)(object)buildSection;

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

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

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

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

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

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

            return(returnValue);
        }
Beispiel #4
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);
        }
Beispiel #5
0
        public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass)
            where T : struct, IConvertible
        {
            ISection returnValue       = null;
            var      buildSectionValue = (eBuildSectionService)(object)buildSection;

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

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

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

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

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

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

            case eBuildSectionService.InterfaceMethods:
            {
                returnValue = new SectionInterfaceMethods <T>(pass);
                break;
            }

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

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

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

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

            return(returnValue);
        }
 public void TestSectionClass()
 {
   SectionClass sc = new SectionClass("parameters");
   Assert.IsTrue(sc.IsStartLine("Content-Type: application/x-Mascot; name=\"parameters\""));
 }