Exemplo n.º 1
0
        public static Config Parse(params IConfigProvider[] configProviders)
        {
            var packageMeta   = new PackageMeta();
            var buildConfig   = new BuildConfig();
            var publishConfig = new PublishConfig();
            var authConfig    = new AuthConfig();

            foreach (var provider in configProviders)
            {
                provider.Parse();
                Merge(packageMeta, provider.GetPackageMeta(), false);
                Merge(buildConfig, provider.GetBuildConfig(), false);
                Merge(publishConfig, provider.GetPublishConfig(), false);
                Merge(authConfig, provider.GetAuthConfig(), false);
            }
            return(new Config(packageMeta, buildConfig, publishConfig, authConfig));
        }
Exemplo n.º 2
0
 private Config(PackageMeta packageMeta, BuildConfig buildConfig, PublishConfig publishConfig, AuthConfig authConfig)
 {
     PackageMeta   = packageMeta;
     BuildConfig   = buildConfig;
     PublishConfig = publishConfig;
 }