Skip to content

Commit 19b334f

Browse files
committed
Cleanup
1 parent 09f3504 commit 19b334f

File tree

14 files changed

+25
-54
lines changed

14 files changed

+25
-54
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Steeltoe.NetCoreTool.Templates
22

33
[![Build Status](https://dev.azure.com/SteeltoeOSS/Steeltoe/_apis/build/status/Initializr/SteeltoeOSS.NetCoreToolTemplates?branchName=main)](https://dev.azure.com/SteeltoeOSS/Steeltoe/_build/latest?definitionId=46&branchName=main)
4-
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)
4+
 [![NuGet Version](https://img.shields.io/nuget/v/Steeltoe.NetCoreTool.Templates?style=flat)](https://www-1.nuget.org/packages/Steeltoe.NetCoreTool.Templates)
5+
 [![GitHub License](https://img.shields.io/github/license/SteeltoeOSS/NetCoreToolTemplates)](LICENSE)
56

67
This repository contains a collection of [.NET Template Packages](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new),
7-
which can be used from IDEs such as Visual Studio and from the .NET CLI using `dotnet new`.
8+
which can be used from IDEs such as Visual Studio and from the .NET CLI using `dotnet new`. They are also used by [Initializr](https://start.steeltoe.io/).
89

910
Project templates:
1011
- `steeltoe-webapi`: Add Steeltoe components to the default `webapi` C# template.

Steeltoe.NetCoreToolTemplates.sln

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio Version 17
3-
VisualStudioVersion = 17.13.35806.99 d17.13
3+
VisualStudioVersion = 17.13.35806.99
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7A45E423-F8A2-4421-81B6-24E6A9E9A64D}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Company.WebApplication.CS", "src\Content\NetCoreTool.Template.WebApi\CSharp\Company.WebApplication.CS.csproj", "{D991A16C-69AD-457F-B9FA-EB0531CF7288}"
88
EndProject
99
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E6A8112D-A16A-481D-844B-E941C29A6BC4}"
1010
EndProject
11-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.NetCoreTool.Template.Test.Utilities", "test\NetCoreTool.Template.Test.Utilities\Steeltoe.NetCoreTool.Template.Test.Utilities.csproj", "{3AE7F581-8327-4723-9D82-246AAB87C88D}"
12-
EndProject
1311
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.NetCoreTool.Template.WebApi.Test", "test\NetCoreTool.Template.WebApi.Test\Steeltoe.NetCoreTool.Template.WebApi.Test.csproj", "{4AC4F8C3-22A0-4ACE-833F-32EEB2D9A697}"
1412
EndProject
1513
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3DD28F12-A4AF-45A9-8719-B84F294D9ACD}"
@@ -48,18 +46,6 @@ Global
4846
{D991A16C-69AD-457F-B9FA-EB0531CF7288}.Release|x64.Build.0 = Release|Any CPU
4947
{D991A16C-69AD-457F-B9FA-EB0531CF7288}.Release|x86.ActiveCfg = Release|Any CPU
5048
{D991A16C-69AD-457F-B9FA-EB0531CF7288}.Release|x86.Build.0 = Release|Any CPU
51-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|Any CPU.Build.0 = Debug|Any CPU
53-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|x64.ActiveCfg = Debug|Any CPU
54-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|x64.Build.0 = Debug|Any CPU
55-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|x86.ActiveCfg = Debug|Any CPU
56-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Debug|x86.Build.0 = Debug|Any CPU
57-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|Any CPU.ActiveCfg = Release|Any CPU
58-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|Any CPU.Build.0 = Release|Any CPU
59-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|x64.ActiveCfg = Release|Any CPU
60-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|x64.Build.0 = Release|Any CPU
61-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|x86.ActiveCfg = Release|Any CPU
62-
{3AE7F581-8327-4723-9D82-246AAB87C88D}.Release|x86.Build.0 = Release|Any CPU
6349
{4AC4F8C3-22A0-4ACE-833F-32EEB2D9A697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6450
{4AC4F8C3-22A0-4ACE-833F-32EEB2D9A697}.Debug|Any CPU.Build.0 = Debug|Any CPU
6551
{4AC4F8C3-22A0-4ACE-833F-32EEB2D9A697}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -90,7 +76,6 @@ Global
9076
EndGlobalSection
9177
GlobalSection(NestedProjects) = preSolution
9278
{D991A16C-69AD-457F-B9FA-EB0531CF7288} = {7A45E423-F8A2-4421-81B6-24E6A9E9A64D}
93-
{3AE7F581-8327-4723-9D82-246AAB87C88D} = {E6A8112D-A16A-481D-844B-E941C29A6BC4}
9479
{4AC4F8C3-22A0-4ACE-833F-32EEB2D9A697} = {E6A8112D-A16A-481D-844B-E941C29A6BC4}
9580
EndGlobalSection
9681
GlobalSection(ExtensibilityGlobals) = postSolution

src/Content/NetCoreTool.Template.WebApi/CSharp/.template.config/template.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,17 @@
342342
"type": "computed",
343343
"value": "ConfigurationSpringBootOption && IsSteeltoeV4"
344344
},
345+
"HasAnyConfiguration": {
346+
"type": "computed",
347+
"value": "HostingCloudFoundryOption || ConfigurationCloudConfigOption || HasConfigurationEncryptionInSteeltoeV4 || ConfigurationPlaceholderOption || ConfigurationRandomValueOption || ConfigurationSpringBootOption"
348+
},
349+
350+
345351

346352

347353
"AnyCloudManagement": {
348354
"type": "computed",
349-
"value": "HasCircuitBreakerHystrixInSteeltoeV3 || AnyDiscoveryClient || HostingAzureSpringCloudOptionSteeltoeV3 || HostingCloudFoundryOption || LoggingDynamicConsoleOption || LoggingDynamicSerilogOption || ManagementEndpointsOption"
355+
"value": "AnyDiscoveryClient || HostingAzureSpringCloudOptionSteeltoeV3 || AnyHostingSteeltoeV3 || LoggingDynamicConsoleOption || LoggingDynamicSerilogOption || ManagementEndpointsOption"
350356
},
351357
"AnyDiscoveryClient": {
352358
"type": "computed",
@@ -356,10 +362,6 @@
356362
"type": "computed",
357363
"value": "AnyDiscoveryClient && IsSteeltoeV3"
358364
},
359-
"AnyConfiguration": {
360-
"type": "computed",
361-
"value": "ConfigurationCloudConfigOption || HasConfigurationEncryptionInSteeltoeV4 || ConfigurationPlaceholderOption || ConfigurationRandomValueOption || ConfigurationSpringBootOption"
362-
},
363365
"AnyConnector": {
364366
"type": "computed",
365367
"value": "ConnectorMongoDbOption || ConnectorCosmosDbOption || ConnectorMySqlEfCoreOption || ConnectorMySqlOption || ConnectorOAuthOptionSteeltoeV3 || ConnectorPostgreSqlEfCoreOption || ConnectorPostgreSqlOption || ConnectorRedisOption || ConnectorRabbitMqOption || ConnectorSqlServerOption || ConnectorSqlServerEfCoreOption"
@@ -402,7 +404,7 @@
402404
},
403405
"AnySteeltoe": {
404406
"type": "computed",
405-
"value": "AnyCloudManagement || AnyConfiguration || AnyConnector || AnyHosting || AnyMessagingRabbitMq || AnyTracing"
407+
"value": "HasCircuitBreakerHystrixInSteeltoeV3 || AnyCloudManagement || HasAnyConfiguration || AnyConnector || AnyHosting || AnyMessagingRabbitMq || AnyTracing"
406408
},
407409
"AnyTracing": {
408410
"type": "computed",

src/Content/NetCoreTool.Template.WebApi/CSharp/HelloHystrixCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public sealed class HelloHystrixCommand : HystrixCommand<string>
99
private readonly string _name;
1010

1111
public HelloHystrixCommand(string name)
12-
: base(HystrixCommandGroupKeyDefault.AsKey("MyCircuitBreakers"))
12+
: base(HystrixCommandGroupKeyDefault.AsKey("ExampleCircuitBreakers"))
1313
{
1414
_name = name;
1515
IsFallbackUserDefined = true;

src/Content/NetCoreTool.Template.WebApi/CSharp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
builder.Services.AddDbContext<AppDbContext>((serviceProvider, options) => options.UseSqlServer(serviceProvider));
287287
#endif
288288
#if (HasCircuitBreakerHystrixInSteeltoeV3)
289-
builder.Services.AddHystrixCommand<HelloHystrixCommand>("MyCircuitBreakers", builder.Configuration);
289+
builder.Services.AddHystrixCommand<HelloHystrixCommand>("ExampleCircuitBreakers", builder.Configuration);
290290
builder.Services.AddHystrixMetricsStream(builder.Configuration);
291291
#endif
292292
#if (ManagementEndpointsOptionSteeltoeV3)

test/NetCoreTool.Template.Test.Utilities/Steeltoe.NetCoreTool.Template.Test.Utilities.csproj

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/NetCoreTool.Template.WebApi.Test/CircuitBreakerHystrixOptionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s
4848
snippets.Add("using Steeltoe.CircuitBreaker.Hystrix;");
4949
snippets.Add($"using {Sandbox.Name};");
5050

51-
snippets.Add(@"builder.Services.AddHystrixCommand<HelloHystrixCommand>(""MyCircuitBreakers"", builder.Configuration);");
51+
snippets.Add(@"builder.Services.AddHystrixCommand<HelloHystrixCommand>(""ExampleCircuitBreakers"", builder.Configuration);");
5252
snippets.Add("builder.Services.AddHystrixMetricsStream(builder.Configuration);");
5353
snippets.Add("app.UseHystrixRequestContext();");
5454
}

test/NetCoreTool.Template.WebApi.Test/OptionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Text;
22
using System.Threading.Tasks;
3-
using Steeltoe.NetCoreTool.Template.Test.Utilities;
3+
using Steeltoe.NetCoreTool.Template.WebApi.Test.Utilities;
44
using Xunit.Abstractions;
55

66
namespace Steeltoe.NetCoreTool.Template.WebApi.Test

test/NetCoreTool.Template.WebApi.Test/Steeltoe.NetCoreTool.Template.WebApi.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<IsTestProject>true</IsTestProject>
66
</PropertyGroup>
77

8-
<ItemGroup>
9-
<ProjectReference Include="..\NetCoreTool.Template.Test.Utilities\Steeltoe.NetCoreTool.Template.Test.Utilities.csproj" />
10-
</ItemGroup>
11-
128
<ItemGroup>
139
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)" PrivateAssets="All" />
10+
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
1411
<PackageReference Include="GitHubActionsTestLogger" Version="$(GitHubActionsTestLoggerVersion)" PrivateAssets="All" />
1512
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
13+
<PackageReference Include="xunit" Version="$(XunitVersion)" />
14+
<PackageReference Include="xunit.runner.console" Version="$(XunitVersion)" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" PrivateAssets="All" />
1616
</ItemGroup>
1717
</Project>

test/NetCoreTool.Template.WebApi.Test/TemplateTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
using System.Threading.Tasks;
22
using FluentAssertions;
3-
using Steeltoe.NetCoreTool.Template.Test.Utilities;
43
using Steeltoe.NetCoreTool.Template.WebApi.Test.Assertions;
5-
using Steeltoe.NetCoreTool.Template.WebApi.Test.Utils;
4+
using Steeltoe.NetCoreTool.Template.WebApi.Test.Utilities;
65
using Xunit;
76
using Xunit.Abstractions;
87

0 commit comments

Comments
 (0)