Skip to content

Double Formatted Resource Strings in InvokeMgGraphRequest.cs #436

Closed

Description

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;
}

Activity

  1. added this to the Post GA milestone on Oct 21, 2020
  2. added a commit that references this issue on Oct 22, 2020
    cce3a26
  3. added a commit that references this issue on Nov 25, 2020
    2da2646
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions