Utilize nameof operator
This commit is contained in:
parent
7dc0508c03
commit
89b5f5b1aa
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Razor.Generator
|
|||
{
|
||||
if (string.IsNullOrEmpty(className))
|
||||
{
|
||||
throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "className");
|
||||
throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, nameof(className));
|
||||
}
|
||||
|
||||
ClassName = className;
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ namespace Microsoft.AspNet.Razor
|
|||
if (change.NewBuffer == null)
|
||||
{
|
||||
throw new ArgumentException(RazorResources.FormatStructure_Member_CannotBeNull(
|
||||
"Buffer",
|
||||
"TextChange"), "change");
|
||||
nameof(change.NewBuffer),
|
||||
nameof(TextChange)), nameof(change));
|
||||
}
|
||||
|
||||
var result = PartialParseResult.Rejected;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace Microsoft.AspNet.Razor.Test.Editor
|
|||
parser.CheckForStructureChanges(change);
|
||||
}
|
||||
});
|
||||
ExceptionHelpers.ValidateArgumentException(parameterName, RazorResources.FormatStructure_Member_CannotBeNull("Buffer", "TextChange"), exception);
|
||||
ExceptionHelpers.ValidateArgumentException(parameterName, RazorResources.FormatStructure_Member_CannotBeNull(nameof(change.NewBuffer), nameof(TextChange)), exception);
|
||||
}
|
||||
|
||||
private static RazorEngineHost CreateHost()
|
||||
|
|
|
|||
Loading…
Reference in New Issue