Exemple #1
0
 private void ExtractConfigValues()
 {
     AppSettingsValues    = _Configuration.Get <AppSettings>();
     NuGetNuSpecSettings  = _Configuration.Get <NuGetNuSpecValues>();
     DotNetNuSpecSettings = _Configuration.Get <DotNetNuSpecValues>();
     if (DotNetNuSpecSettings.UseNuGetNuSpecValues)
     {
         DotNetNuSpecSettings.AssignFrom(NuGetNuSpecSettings);
     }
     NuGetRepos =
         _Configuration.Get <NuGetRepositories>(_NUGET_REPOSITORIES);
     NuGetDestinations =
         _Configuration.Get <NuGetPushDestinations>
             (_NUGET_PUSH_DESTINATIONS);
     FullFrameworkCommands =
         _Configuration.Get <DotNetFullFrameworkCommandSequence>
             (_DOT_NET_FULL_FRAMEWORK_COMMAND_SEQUENCE);
     Standard_2_0_Commands =
         _Configuration.Get <DotNetStandard_2_0_CommandSequence>
             (_DOT_NET_STANDARD_2_0_COMMAND_SEQUENCE);
     Core_2_0_Commands =
         _Configuration.Get <DotNetCore_2_0_CommandSequence>
             (_DOT_NET_CORE_2_0_COMMAND_SEQUENCE);
     Core_2_1_Commands =
         _Configuration.Get <DotNetCore_2_1_CommandSequence>
             (_DOT_NET_CORE_2_1_COMMAND_SEQUENCE);
 }
Exemple #2
0
 private void LoadOptionalConfiguration(string aConfigPath)
 {
     if (File.Exists(aConfigPath))
     {
         _Configuration =
             new ConfigurationBuilder()
             .AddAppConfig(aConfigPath, true, true)
             .Build();
         NuGetNuSpecValues vNuGetNuSpecSettings =
             _Configuration.Get <NuGetNuSpecValues>();
         AppSettings vAppSettingsValues = _Configuration.Get <AppSettings>();
         NuGetNuSpecSettings.AssignFrom(vNuGetNuSpecSettings);
         DotNetNuSpecSettings = _Configuration.Get <DotNetNuSpecValues>();
         if (DotNetNuSpecSettings.UseNuGetNuSpecValues)
         {
             DotNetNuSpecSettings.AssignFrom(NuGetNuSpecSettings);
         }
         AppSettingsValues.AssignFrom(vAppSettingsValues);
     }
 }