コード例 #1
0
        public static IGenerator CreateGenerator(ExportType type, RuleSetValidator ruleSetValidator)
        {
            IGenerator generator = null;

            switch (type)
            {
                case ExportType.Xml:
                    generator = new XmlGenerator(ruleSetValidator);
                    break;
                case ExportType.Json:
                    generator = new JsonGenerator(ruleSetValidator);
                    break;
                case ExportType.CSharpObject:
                    generator = new CSharpGenerator(ruleSetValidator);
                    break;
            }

            return generator;
        }
コード例 #2
0
        public static IGenerator CreateGenerator(ExportType type, RuleSetValidator ruleSetValidator)
        {
            IGenerator generator = null;

            switch (type)
            {
            case ExportType.Xml:
                generator = new XmlGenerator(ruleSetValidator);
                break;

            case ExportType.Json:
                generator = new JsonGenerator(ruleSetValidator);
                break;

            case ExportType.CSharpObject:
                generator = new CSharpGenerator(ruleSetValidator);
                break;
            }

            return(generator);
        }