Skip to content

Double Formatted Resource Strings in InvokeMgGraphRequest.cs #436

Closed
@ryanspletzer

Description

@ryanspletzer

Correct me if I'm wrong, but it appears like this string would be double formatted, once in the method argument then again inside the GetValidationError method implementation. It shouldn't cause any errors, but it was just odd to see.

errorRecord = GetValidationError(
Resources.NotFileSystemPath.FormatCurrentCulture(InputFilePath),
Errors.InvokeGraphRequestFileNotFilesystemPathException, InputFilePath);

private ErrorRecord GetValidationError(string msg, string errorId, params object[] args)
{
msg = msg.FormatCurrentCulture(args);
var ex = new ValidationMetadataException(msg);
var error = new ErrorRecord(ex, errorId, ErrorCategory.InvalidArgument, this);
return error;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions