diff --git a/CSharpInteractive.Tests/README_TEMPLATE.md b/CSharpInteractive.Tests/README_TEMPLATE.md index c76d000..f9fda95 100644 --- a/CSharpInteractive.Tests/README_TEMPLATE.md +++ b/CSharpInteractive.Tests/README_TEMPLATE.md @@ -3,7 +3,7 @@ - Global state - [Using Args](#using-args) - - [Using Props dictionary](#using-props-dictionary) + - [Using Props](#using-props) - [Using the Host property](#using-the-host-property) - [Get services](#get-services) - [Service collection](#service-collection) @@ -65,17 +65,16 @@ if (Args.Count > 1) -### Using Props dictionary +### Using Props + -Properties _Props_ have got from TeamCity system properties automatically. ``` CSharp -WriteLine(Props["TEAMCITY_VERSION"]); -WriteLine(Props["TEAMCITY_PROJECT_NAME"]); +WriteLine(Props["version"]); -// This property will be available at the next TeamCity steps as system parameter _system.Version_ -// and some runners, for instance, the .NET runner, pass it as a build property. -Props["Version"] = "1.1.6"; +// Some CI/CDs have integration of these properties. +// For example in TeamCity this property with all changes will be available in the next TeamCity steps. +Props["version"] = "1.1.6"; ``` diff --git a/CSharpInteractive.Tests/UsageScenarios/BaseScenario.cs b/CSharpInteractive.Tests/UsageScenarios/BaseScenario.cs index 367acd5..c2aacaa 100644 --- a/CSharpInteractive.Tests/UsageScenarios/BaseScenario.cs +++ b/CSharpInteractive.Tests/UsageScenarios/BaseScenario.cs @@ -54,8 +54,7 @@ private class Properties : IProperties { private readonly Dictionary _dict = new() { - {"TEAMCITY_VERSION", "2021.2"}, - {"TEAMCITY_PROJECT_NAME", "Samples"} + {"version", "1.1.5"} }; public int Count => _dict.Count; diff --git a/CSharpInteractive.Tests/UsageScenarios/PropsScenario.cs b/CSharpInteractive.Tests/UsageScenarios/PropsScenario.cs index 02676ef..bd3e3ac 100644 --- a/CSharpInteractive.Tests/UsageScenarios/PropsScenario.cs +++ b/CSharpInteractive.Tests/UsageScenarios/PropsScenario.cs @@ -10,15 +10,13 @@ public void Run() // $visible=true // $tag=08 Global state // $priority=01 - // $description=Using Props dictionary - // $header=Properties _Props_ have got from TeamCity system properties automatically. + // $description=Using Props // { - WriteLine(Props["TEAMCITY_VERSION"]); - WriteLine(Props["TEAMCITY_PROJECT_NAME"]); + WriteLine(Props["version"]); - // This property will be available at the next TeamCity steps as system parameter _system.Version_ - // and some runners, for instance, the .NET runner, pass it as a build property. - Props["Version"] = "1.1.6"; + // Some CI/CDs have integration of these properties. + // For example in TeamCity this property with all changes will be available in the next TeamCity steps. + Props["version"] = "1.1.6"; // } } } \ No newline at end of file diff --git a/README.md b/README.md index 7f194fc..2292dec 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ dotnet run --project Build - Global state - [Using Args](#using-args) - - [Using Props dictionary](#using-props-dictionary) + - [Using Props](#using-props) - [Using the Host property](#using-the-host-property) - [Get services](#get-services) - [Service collection](#service-collection) @@ -312,17 +312,16 @@ if (Args.Count > 1) -### Using Props dictionary +### Using Props + -Properties _Props_ have got from TeamCity system properties automatically. ``` CSharp -WriteLine(Props["TEAMCITY_VERSION"]); -WriteLine(Props["TEAMCITY_PROJECT_NAME"]); +WriteLine(Props["version"]); -// This property will be available at the next TeamCity steps as system parameter _system.Version_ -// and some runners, for instance, the .NET runner, pass it as a build property. -Props["Version"] = "1.1.6"; +// Some CI/CDs have integration of these properties. +// For example in TeamCity this property with all changes will be available in the next TeamCity steps. +Props["version"] = "1.1.6"; ```