Cleanup all the Trims everywhere. csc is the only program which requires response files to have quotes.
additional cleanup
This commit is contained in:
parent
806e506368
commit
b1885eaa58
6 changed files with 31 additions and 40 deletions
|
@ -20,13 +20,7 @@ namespace Microsoft.DotNet.Tools.Resgen
|
|||
public int Execute()
|
||||
{
|
||||
var inputResourceFiles = Args.Select(ParseInputFile).ToArray();
|
||||
var outputResourceFile = ResourceFile.Create(OutputFileName.Trim('"'));
|
||||
|
||||
var trimmedCompilationReferences = default(string[]);
|
||||
if (CompilationReferences != null)
|
||||
{
|
||||
trimmedCompilationReferences = CompilationReferences.Select(r => r.Trim('"')).ToArray();
|
||||
}
|
||||
var outputResourceFile = ResourceFile.Create(OutputFileName);
|
||||
|
||||
switch (outputResourceFile.Type)
|
||||
{
|
||||
|
@ -43,7 +37,7 @@ namespace Microsoft.DotNet.Tools.Resgen
|
|||
outputStream,
|
||||
metadata,
|
||||
Path.GetFileNameWithoutExtension(outputResourceFile.File.Name),
|
||||
trimmedCompilationReferences
|
||||
CompilationReferences.ToArray()
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
@ -82,10 +76,6 @@ namespace Microsoft.DotNet.Tools.Resgen
|
|||
metadataName = arg;
|
||||
}
|
||||
|
||||
// Remove surrounding quotes
|
||||
name = name.Trim('"');
|
||||
metadataName = metadataName.Trim('"');
|
||||
|
||||
return new ResourceSource(ResourceFile.Create(name), metadataName);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue