Replacing static names in exception messages with nameof literal
This commit is contained in:
@@ -12,7 +12,7 @@ public class DefaultStartFormFactory : IStartFormFactory
|
||||
{
|
||||
if (!typeof(FormBase).IsAssignableFrom(startFormClass))
|
||||
{
|
||||
throw new ArgumentException("startFormClass argument must be a FormBase type");
|
||||
throw new ArgumentException($"{nameof(startFormClass)} argument must be a {nameof(FormBase)} type");
|
||||
}
|
||||
|
||||
_startFormClass = startFormClass;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ServiceProviderStartFormFactory : IStartFormFactory
|
||||
{
|
||||
if (!typeof(FormBase).IsAssignableFrom(startFormClass))
|
||||
{
|
||||
throw new ArgumentException("startFormClass argument must be a FormBase type");
|
||||
throw new ArgumentException($"{nameof(startFormClass)} argument must be a {nameof(FormBase)} type");
|
||||
}
|
||||
|
||||
_startFormClass = startFormClass;
|
||||
|
||||
Reference in New Issue
Block a user