diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/DataStoreErrorLogger.cs b/src/Microsoft.AspNet.Diagnostics.Entity/DataStoreErrorLogger.cs index f15163da0e..3d9c8320df 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/DataStoreErrorLogger.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/DataStoreErrorLogger.cs @@ -82,8 +82,8 @@ namespace Microsoft.AspNet.Diagnostics.Entity public virtual void SetError([NotNull] Type contextType, [NotNull] Exception exception) { - Check.NotNull(contextType, "contextType"); - Check.NotNull(exception, "exception"); + Check.NotNull(contextType, nameof(contextType)); + Check.NotNull(exception, nameof(exception)); _contextType = contextType; _exception = exception; diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageExtensions.cs b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageExtensions.cs index e8e0bd3a8c..5dc3f55039 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageExtensions.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageExtensions.cs @@ -11,15 +11,15 @@ namespace Microsoft.AspNet.Builder { public static IApplicationBuilder UseDatabaseErrorPage([NotNull] this IApplicationBuilder builder) { - Check.NotNull(builder, "builder"); + Check.NotNull(builder, nameof(builder)); return builder.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll); } public static IApplicationBuilder UseDatabaseErrorPage([NotNull] this IApplicationBuilder builder, [NotNull] DatabaseErrorPageOptions options) { - Check.NotNull(builder, "builder"); - Check.NotNull(options, "options"); + Check.NotNull(builder, nameof(builder)); + Check.NotNull(options, nameof(options)); return builder.UseMiddleware(options); } diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs index ca2c4815e0..9f326237ec 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs @@ -27,10 +27,10 @@ namespace Microsoft.AspNet.Diagnostics.Entity public DatabaseErrorPageMiddleware([NotNull] RequestDelegate next, [NotNull] IServiceProvider serviceProvider, [NotNull] ILoggerFactory loggerFactory, [NotNull] DatabaseErrorPageOptions options) { - Check.NotNull(next, "next"); - Check.NotNull(serviceProvider, "serviceProvider"); - Check.NotNull(loggerFactory, "loggerFactory"); - Check.NotNull(options, "options"); + Check.NotNull(next, nameof(next)); + Check.NotNull(serviceProvider, nameof(serviceProvider)); + Check.NotNull(loggerFactory, nameof(loggerFactory)); + Check.NotNull(options, nameof(options)); _next = next; _serviceProvider = serviceProvider; diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageOptions.cs b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageOptions.cs index 415185ba0e..c093d23bee 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageOptions.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageOptions.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity public static DatabaseErrorPageOptions ShowAll => new DatabaseErrorPageOptions { ShowExceptionDetails = true, - ListMigrations = true, + ListMigrations = true }; public virtual bool ShowExceptionDetails { get; set; } diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/Utilities/Check.cs b/src/Microsoft.AspNet.Diagnostics.Entity/Utilities/Check.cs index a40ad1117b..9fda135d4c 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/Utilities/Check.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/Utilities/Check.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Utilities [ContractAnnotation("value:null => halt")] public static T NotNull([NoEnumeration] T value, [InvokerParameterName] [NotNull] string parameterName) { - NotEmpty(parameterName, "parameterName"); + NotEmpty(parameterName, nameof(parameterName)); if (ReferenceEquals(value, null)) { @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Utilities [ContractAnnotation("value:null => halt")] public static IReadOnlyList NotEmpty(IReadOnlyList value, [InvokerParameterName] [NotNull] string parameterName) { - NotEmpty(parameterName, "parameterName"); + NotEmpty(parameterName, nameof(parameterName)); NotNull(value, parameterName); if (value.Count == 0) @@ -43,7 +43,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Utilities { if (ReferenceEquals(parameterName, null)) { - throw new ArgumentNullException("parameterName"); + throw new ArgumentNullException(nameof(parameterName)); } if (parameterName.Length == 0) @@ -67,7 +67,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Utilities public static T IsDefined(T value, [InvokerParameterName] [NotNull] string parameterName) where T : struct { - NotEmpty(parameterName, "parameterName"); + NotEmpty(parameterName, nameof(parameterName)); if (!Enum.IsDefined(typeof(T), value)) {