Task | Branch | Semantic version | NuGet version |
---|---|---|---|
Implement feature #1 | feature/a-refactor-value-naming | 2.3.0-a-refactor-value-naming.1 | 2.3.0-a-refactor-value0001 |
Implement feature #2 | feature/a-update-documentation | 2.3.0-a-update-documentation.1 | 2.3.0-a-update-documen0001 |
Implement feature #1 | feature/a-refactor-value-naming | 2.3.0-a-refactor-value-naming.2 | 2.3.0-a-refactor-value0002 |
Complete feature #1 | develop | 2.3.0-b.3 | 2.3.0-b0003 |
Complete feature #2 | develop | 2.3.0-b.7 | 2.3.0-b0007 |
Stabilize release | release-2.3.0 | 2.3.0-rc.0 | 2.3.0-rc0000 |
Release to production | master | 2.3.0 | 2.3.0 |
Fix production issue | hotfix-2.3.1 | 2.3.1-rc.1 | 2.3.1-rc0001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Host": "http://localhost", | |
"Connection": { | |
"TimesOutIn": "00:01:00", | |
"RetryCount": "5" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var configurationBuilder = new ConfigurationBuilder(); | |
configurationBuilder.AddJsonFile("appSettings.json"); | |
var configuration = configurationBuilder.Build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var host = configuration["Host"]; | |
var connectionTimesOutIn = configuration["Connection:TimesOutIn"]; | |
var connectionRetryCount = configuration["Connection:RetryCount"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var configurationBuilder = new ConfigurationBuilder(); | |
configurationBuilder.AddJsonFile("appSettings.json"); | |
configurationBuilder.AddXmlFile("appSettings.xml"); | |
configurationBuilder.AddEnvironmentVariables(); | |
var configuration = configurationBuilder.Build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var environment = "development"; | |
var configurationBuilder = new ConfigurationBuilder(); | |
configurationBuilder.AddJsonFile("appSettings.json"); | |
configurationBuilder.AddJsonFile($"appSettings.{environment}.json", true); | |
configurationBuilder.AddEnvironmentVariables(); | |
var configuration = configurationBuilder.Build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppSettings { | |
public Uri Host { get; set; } | |
public ConnectionSettings Connection { get; set; } | |
public class ConnectionSettings | |
{ | |
public TimeSpan TimesOutIn { get; set; } | |
public int RetryCount { get; set; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddOptions(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
public HomeController(IOptions<AppSettings> appSettingsOptions) | |
{ | |
AppSettings = appSettingsOptions.Options; | |
} | |
AppSettings AppSettings { get; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var octopusSettings = new OctopusConfigurationProviderOptions | |
{ | |
ServerAddress = new Uri("https://demo.octopusdeploy.com/"), | |
ApiKey = "API-GUEST", | |
ProjectName = "OctoFX Rate Service", | |
EnvironmentName = "Production" | |
}; | |
var configurationBuilder = new ConfigurationBuilder(); | |
configurationBuilder.AddOctopus(octopusSettings); |