Skip to content

Commit

Permalink
chore: use char instead of string in replace
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkallesen committed Aug 13, 2024
1 parent 180016a commit 0da635e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public static bool GenerateServerSln(
ArgumentNullException.ThrowIfNull(srcPath);

var projectName = projectPrefixName
.Replace(" ", ".", StringComparison.Ordinal)
.Replace("-", ".", StringComparison.Ordinal)
.Replace(' ', '.')
.Replace('-', '.')
.Trim();

var rootPath = outputSlnPath.EndsWith(".sln", StringComparison.OrdinalIgnoreCase)
Expand Down
8 changes: 4 additions & 4 deletions src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ protected BaseProjectOptions(
RouteBase = openApiDocument.GetServerUrlBasePath();
ProjectName = string.IsNullOrEmpty(projectSuffixName)
? projectPrefixName
.Replace(" ", ".", StringComparison.Ordinal)
.Replace("-", ".", StringComparison.Ordinal)
.Replace(' ', '.')
.Replace('-', '.')
.Trim()
: projectPrefixName
.Replace(" ", ".", StringComparison.Ordinal)
.Replace("-", ".", StringComparison.Ordinal)
.Replace(' ', '.')
.Replace('-', '.')
.Trim() + $".{projectSuffixName}";

ProjectPrefixName = ProjectName.Contains('.', StringComparison.Ordinal)
Expand Down

0 comments on commit 0da635e

Please sign in to comment.