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 = (eBuildSectionAppContext)(object)buildSection; switch (buildSectionValue) { case eBuildSectionAppContext.UsingStatements: { returnValue = new SectionUsingStatements <T>(pass); break; } case eBuildSectionAppContext.Namespace: { returnValue = new SectionNamespace <T>(pass); break; } case eBuildSectionAppContext.Interface: { returnValue = new SectionInterface <T>(pass); break; } case eBuildSectionAppContext.Class: { returnValue = new SectionClass <T>(pass); break; } case eBuildSectionAppContext.Constructors: { returnValue = new SectionConstructors <T>(pass); break; } case eBuildSectionAppContext.Properties: { returnValue = new SectionProperties <T>(pass); break; } case eBuildSectionAppContext.InterfaceProperties: { returnValue = new SectionInterfaceProperties <T>(pass); break; } case eBuildSectionAppContext.PublicMethods: { returnValue = new SectionPublicMethods <T>(pass); break; } case eBuildSectionAppContext.PrivateMethods: { returnValue = new SectionPrivateMethods <T>(pass); break; } case eBuildSectionAppContext.ClassClose: { returnValue = new SectionClassClose <T>(pass); break; } case eBuildSectionAppContext.NamespaceClose: { returnValue = new SectionNamespaceClose <T>(pass); break; } } return(returnValue); }