Skip to content

Commit

Permalink
fix: support - symbols in csproj names
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison committed Nov 7, 2024
1 parent 3dba936 commit 78b7459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion InterfaceStubGenerator.Shared/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ bool nullableEnabled
}

// Remove dots
ns = ns!.Replace(".", "");
ns = ns!.Replace(".", "").Replace('-', '_');
var interfaceDisplayName = interfaceSymbol.ToDisplayString(
SymbolDisplayFormat.FullyQualifiedFormat
);
Expand Down
2 changes: 1 addition & 1 deletion Refit/UniqueName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static string ForType(Type refitInterfaceType)
interfaceTypeName = interfaceTypeName.Replace("+", "");

// Get the namespace and remove the dots
var ns = refitInterfaceType.Namespace?.Replace(".", "");
var ns = refitInterfaceType.Namespace?.Replace(".", "").Replace("-", "_");

// Refit types will be generated as private classes within a Generated type in namespace
// Refit.Implementation
Expand Down

0 comments on commit 78b7459

Please sign in to comment.