diff --git a/src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs b/src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs index f9d2e389d4d3b40c34949e6a3ea0711638c37755..d12985711896c1f01c12825d92a3489d6bb6fe25 100644 --- a/src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs +++ b/src/Workspaces/Core/Portable/CodeGeneration/AbstractCodeGenerationService.cs @@ -98,14 +98,14 @@ protected static T Cast(object value) { if (destination == null) { - throw new ArgumentNullException("destination"); + throw new ArgumentNullException(nameof(destination)); } if (!(destination is TDeclarationNode)) { throw new ArgumentException( string.Format(WorkspacesResources.InvalidDestinationNode, typeof(TDeclarationNode).Name, destination.GetType().Name), - "destination"); + nameof(destination)); } } @@ -115,7 +115,7 @@ protected static T Cast(object value) { if (destination == null) { - throw new ArgumentNullException("destination"); + throw new ArgumentNullException(nameof(destination)); } if (!(destination is TDeclarationNode1) && @@ -124,7 +124,7 @@ protected static T Cast(object value) throw new ArgumentException( string.Format(WorkspacesResources.InvalidDestinationNode2, typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), - "destination"); + nameof(destination)); } } @@ -135,7 +135,7 @@ protected static T Cast(object value) { if (destination == null) { - throw new ArgumentNullException("destination"); + throw new ArgumentNullException(nameof(destination)); } if (!(destination is TDeclarationNode1) && @@ -145,7 +145,7 @@ protected static T Cast(object value) throw new ArgumentException( string.Format(WorkspacesResources.InvalidDestinationNode3, typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), - "destination"); + nameof(destination)); } } @@ -163,7 +163,7 @@ protected static T Cast(object value) throw new ArgumentException( string.Format(WorkspacesResources.InvalidDestinationNode3, typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name), - "destination"); + nameof(destination)); } } diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs b/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs index 4086f5b008c161eb1e65344fea96210243e51b99..1e818d7d80c4fab8091d6b938955a20ba641d672 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs +++ b/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs @@ -467,7 +467,7 @@ internal class WorkspacesResources { } /// - /// Looks up a localized string similar to Destination type must be a {0}. but given one is {1}.. + /// Looks up a localized string similar to Destination type must be a {0}, but given one is {1}.. /// internal static string InvalidDestinationNode { get { @@ -476,7 +476,7 @@ internal class WorkspacesResources { } /// - /// Looks up a localized string similar to Destination type must be a {0} or a {1}. but given one is {2}.. + /// Looks up a localized string similar to Destination type must be a {0} or a {1}, but given one is {2}.. /// internal static string InvalidDestinationNode2 { get { @@ -485,7 +485,7 @@ internal class WorkspacesResources { } /// - /// Looks up a localized string similar to Destination type must be a {0}, {1} or {2}. but given one is {3}.. + /// Looks up a localized string similar to Destination type must be a {0}, {1} or {2}, but given one is {3}.. /// internal static string InvalidDestinationNode3 { get { diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.resx b/src/Workspaces/Core/Portable/WorkspacesResources.resx index e584e43add77d131abb8b99dba312d324e2eaad9..c3cc29f97e9934282e98d8a664a9bba4e8f4751a 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.resx +++ b/src/Workspaces/Core/Portable/WorkspacesResources.resx @@ -130,13 +130,13 @@ Cycle detected in extensions - Destination type must be a {0}. but given one is {1}. + Destination type must be a {0}, but given one is {1}. - Destination type must be a {0} or a {1}. but given one is {2}. + Destination type must be a {0} or a {1}, but given one is {2}. - Destination type must be a {0}, {1} or {2}. but given one is {3}. + Destination type must be a {0}, {1} or {2}, but given one is {3}. Could not find location to generation symbol into.