Exemple #1
0
        private void BuildProject()
        {
            var pathExtension = Path.GetExtension(ConfigPath).ToUpper();

            switch (pathExtension)
            {
            case ".JSON":
            {
                ConfigBuilder = new JsonBuilder(ConfigPath);
                break;
            }

            case ".YML":
            {
                ConfigBuilder = new YamlBuilder(ConfigPath);
                break;
            }

            default:
            {
                throw new SmartCodeException($"未知扩展名:{pathExtension}");
            }
            }
            Project            = ConfigBuilder.Build();
            Project.ConfigPath = ConfigPath;
        }
Exemple #2
0
 public void Build()
 {
     var         configPath  = @"D:\01Code\Git\OpenSource\SmartCode\doc\SmartCode.yml";
     YamlBuilder yamlBuilder = new YamlBuilder(configPath);
     var         project     = yamlBuilder.Build();
 }
Exemple #3
0
 public void Build()
 {
     var         configPath  = @"E:\Ahoo\SmartCode\doc\SmartCode.yml";
     YamlBuilder yamlBuilder = new YamlBuilder(configPath);
     var         project     = yamlBuilder.Build();
 }