Skip to content

Commit

Permalink
Refactor namespace parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mganss committed Aug 9, 2023
1 parent 9c836ac commit 567dbe8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions XmlSchemaClassGenerator/CodeUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,7 @@ public static KeyValuePair<NamespaceKey, string> ParseNamespace(string nsArg, st
var parts = nsArg.Split(new[] { '=' }, 2);

if (parts.Length == 1)
{
var ns = parts[0];
if (!string.IsNullOrEmpty(namespacePrefix))
ns = namespacePrefix + "." + ns;
return new KeyValuePair<NamespaceKey, string>(new NamespaceKey(), ns);
}
parts = new[] { string.Empty, parts[0] };

if (parts.Length != 2)
throw new ArgumentException("XML and C# namespaces should be separated by '='. You entered: " + nsArg);
Expand Down

0 comments on commit 567dbe8

Please sign in to comment.