diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 139386d091a..454351144fa 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -7,6 +7,7 @@ True $(MSBuildThisFileDirectory)..\rulesets\EFCore.ruleset enable + nullablePublicOnly diff --git a/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs b/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs index b58ba893491..84cedbe7d01 100644 --- a/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs +++ b/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { diff --git a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs index ef4d8479c36..204e170dd40 100644 --- a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs +++ b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking { diff --git a/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs b/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs index 83b6bbbbf96..b6968ef7ee6 100644 --- a/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs +++ b/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs @@ -5,7 +5,6 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore.Abstractions/Infrastructure/LazyLoaderExtensions.cs b/src/EFCore.Abstractions/Infrastructure/LazyLoaderExtensions.cs index 2a8d48b061b..282f2cf741a 100644 --- a/src/EFCore.Abstractions/Infrastructure/LazyLoaderExtensions.cs +++ b/src/EFCore.Abstractions/Infrastructure/LazyLoaderExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Runtime.CompilerServices; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore.Cosmos/Diagnostics/CosmosQueryEventData.cs b/src/EFCore.Cosmos/Diagnostics/CosmosQueryEventData.cs index 60c5d609ac2..94a17c0f024 100644 --- a/src/EFCore.Cosmos/Diagnostics/CosmosQueryEventData.cs +++ b/src/EFCore.Cosmos/Diagnostics/CosmosQueryEventData.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Cosmos/Diagnostics/CosmosReadItemEventData.cs b/src/EFCore.Cosmos/Diagnostics/CosmosReadItemEventData.cs index 1f8b2ca00d2..8f0380a0172 100644 --- a/src/EFCore.Cosmos/Diagnostics/CosmosReadItemEventData.cs +++ b/src/EFCore.Cosmos/Diagnostics/CosmosReadItemEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosSqlQuery.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosSqlQuery.cs index dce40f9e419..fb610db60a9 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosSqlQuery.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosSqlQuery.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { diff --git a/src/EFCore.Cosmos/Storage/Internal/HttpException.cs b/src/EFCore.Cosmos/Storage/Internal/HttpException.cs index b9e40693480..71ee4e2f816 100644 --- a/src/EFCore.Cosmos/Storage/Internal/HttpException.cs +++ b/src/EFCore.Cosmos/Storage/Internal/HttpException.cs @@ -3,7 +3,6 @@ using System; using System.Net.Http; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { diff --git a/src/EFCore.Cosmos/Storage/Internal/SqlParameter.cs b/src/EFCore.Cosmos/Storage/Internal/SqlParameter.cs index 69161fe0fb8..9220e61d8be 100644 --- a/src/EFCore.Cosmos/Storage/Internal/SqlParameter.cs +++ b/src/EFCore.Cosmos/Storage/Internal/SqlParameter.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// diff --git a/src/EFCore.Design/Design/IOperationReportHandler.cs b/src/EFCore.Design/Design/IOperationReportHandler.cs index 54fe506afb2..d40fd6b6d0f 100644 --- a/src/EFCore.Design/Design/IOperationReportHandler.cs +++ b/src/EFCore.Design/Design/IOperationReportHandler.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design { /// diff --git a/src/EFCore.Design/Design/IOperationResultHandler.cs b/src/EFCore.Design/Design/IOperationResultHandler.cs index cb1025e8374..d771f4c24dc 100644 --- a/src/EFCore.Design/Design/IOperationResultHandler.cs +++ b/src/EFCore.Design/Design/IOperationResultHandler.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design { /// diff --git a/src/EFCore.Design/Design/IPluralizer.cs b/src/EFCore.Design/Design/IPluralizer.cs index 84955943746..3f8213f6214 100644 --- a/src/EFCore.Design/Design/IPluralizer.cs +++ b/src/EFCore.Design/Design/IPluralizer.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics.CodeAnalysis; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Design { diff --git a/src/EFCore.Design/Design/Internal/ContextInfo.cs b/src/EFCore.Design/Design/Internal/ContextInfo.cs index 126de5eef87..1620c329b5c 100644 --- a/src/EFCore.Design/Design/Internal/ContextInfo.cs +++ b/src/EFCore.Design/Design/Internal/ContextInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design.Internal { /// diff --git a/src/EFCore.Design/Design/Internal/IOperationReporter.cs b/src/EFCore.Design/Design/Internal/IOperationReporter.cs index 5ab2256c2e7..c0428dfcefc 100644 --- a/src/EFCore.Design/Design/Internal/IOperationReporter.cs +++ b/src/EFCore.Design/Design/Internal/IOperationReporter.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design.Internal { /// diff --git a/src/EFCore.Design/Design/Internal/MigrationInfo.cs b/src/EFCore.Design/Design/Internal/MigrationInfo.cs index 561698dcf7b..18e2c992962 100644 --- a/src/EFCore.Design/Design/Internal/MigrationInfo.cs +++ b/src/EFCore.Design/Design/Internal/MigrationInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design.Internal { /// diff --git a/src/EFCore.Design/Design/Internal/OperationReporter.cs b/src/EFCore.Design/Design/Internal/OperationReporter.cs index 8cb0bf45e88..96b6cd91146 100644 --- a/src/EFCore.Design/Design/Internal/OperationReporter.cs +++ b/src/EFCore.Design/Design/Internal/OperationReporter.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design.Internal { /// diff --git a/src/EFCore.Design/Design/OperationException.cs b/src/EFCore.Design/Design/OperationException.cs index 871966c6265..27a4dcffdf7 100644 --- a/src/EFCore.Design/Design/OperationException.cs +++ b/src/EFCore.Design/Design/OperationException.cs @@ -3,7 +3,6 @@ using System; using System.Runtime.Serialization; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Design { diff --git a/src/EFCore.Design/Design/OperationReportHandler.cs b/src/EFCore.Design/Design/OperationReportHandler.cs index 8149a3177f4..55f2af0f218 100644 --- a/src/EFCore.Design/Design/OperationReportHandler.cs +++ b/src/EFCore.Design/Design/OperationReportHandler.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Design { diff --git a/src/EFCore.Design/Metadata/Internal/ScaffoldingPropertyExtensions.cs b/src/EFCore.Design/Metadata/Internal/ScaffoldingPropertyExtensions.cs index 1fae08122d0..7fbd23ff38f 100644 --- a/src/EFCore.Design/Metadata/Internal/ScaffoldingPropertyExtensions.cs +++ b/src/EFCore.Design/Metadata/Internal/ScaffoldingPropertyExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore.Design/Migrations/Design/IMigrationsCodeGeneratorSelector.cs b/src/EFCore.Design/Migrations/Design/IMigrationsCodeGeneratorSelector.cs index f791da6247d..7e1254eb811 100644 --- a/src/EFCore.Design/Migrations/Design/IMigrationsCodeGeneratorSelector.cs +++ b/src/EFCore.Design/Migrations/Design/IMigrationsCodeGeneratorSelector.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Design { /// diff --git a/src/EFCore.Design/Migrations/Design/IMigrationsScaffolder.cs b/src/EFCore.Design/Migrations/Design/IMigrationsScaffolder.cs index 1120f2c949e..c56e4de698d 100644 --- a/src/EFCore.Design/Migrations/Design/IMigrationsScaffolder.cs +++ b/src/EFCore.Design/Migrations/Design/IMigrationsScaffolder.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Design { /// diff --git a/src/EFCore.Design/Migrations/Design/MigrationFiles.cs b/src/EFCore.Design/Migrations/Design/MigrationFiles.cs index 019c7bf94ff..2e75f32ce19 100644 --- a/src/EFCore.Design/Migrations/Design/MigrationFiles.cs +++ b/src/EFCore.Design/Migrations/Design/MigrationFiles.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Design { /// diff --git a/src/EFCore.Design/Scaffolding/IModelCodeGeneratorSelector.cs b/src/EFCore.Design/Scaffolding/IModelCodeGeneratorSelector.cs index 865b164a253..4cb1c2bc6a0 100644 --- a/src/EFCore.Design/Scaffolding/IModelCodeGeneratorSelector.cs +++ b/src/EFCore.Design/Scaffolding/IModelCodeGeneratorSelector.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding { /// diff --git a/src/EFCore.Design/Scaffolding/IReverseEngineerScaffolder.cs b/src/EFCore.Design/Scaffolding/IReverseEngineerScaffolder.cs index 56af8f0296f..b72168b1673 100644 --- a/src/EFCore.Design/Scaffolding/IReverseEngineerScaffolder.cs +++ b/src/EFCore.Design/Scaffolding/IReverseEngineerScaffolder.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding { /// diff --git a/src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs index d84e8461147..40aab836db9 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { diff --git a/src/EFCore.Design/Scaffolding/Internal/ICSharpUtilities.cs b/src/EFCore.Design/Scaffolding/Internal/ICSharpUtilities.cs index 2364029b9c8..ad6bd1f859a 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ICSharpUtilities.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ICSharpUtilities.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { diff --git a/src/EFCore.Design/Scaffolding/Internal/IScaffoldingTypeMapper.cs b/src/EFCore.Design/Scaffolding/Internal/IScaffoldingTypeMapper.cs index cc473de4dc9..0fe339b88b5 100644 --- a/src/EFCore.Design/Scaffolding/Internal/IScaffoldingTypeMapper.cs +++ b/src/EFCore.Design/Scaffolding/Internal/IScaffoldingTypeMapper.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { /// diff --git a/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseForeignKeyExtensions.cs b/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseForeignKeyExtensions.cs index dd230801256..f7ea0d28216 100644 --- a/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseForeignKeyExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseForeignKeyExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal { diff --git a/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseTableExtensions.cs b/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseTableExtensions.cs index ab3d07490f7..b6800e44173 100644 --- a/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseTableExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Metadata/Internal/DatabaseTableExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal { /// diff --git a/src/EFCore.Design/Scaffolding/ModelCodeGenerationOptions.cs b/src/EFCore.Design/Scaffolding/ModelCodeGenerationOptions.cs index fa8c65933e4..7725dc7cf90 100644 --- a/src/EFCore.Design/Scaffolding/ModelCodeGenerationOptions.cs +++ b/src/EFCore.Design/Scaffolding/ModelCodeGenerationOptions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding { /// diff --git a/src/EFCore.Design/Scaffolding/ScaffoldedFile.cs b/src/EFCore.Design/Scaffolding/ScaffoldedFile.cs index b5de9c601ec..ebddbf311a4 100644 --- a/src/EFCore.Design/Scaffolding/ScaffoldedFile.cs +++ b/src/EFCore.Design/Scaffolding/ScaffoldedFile.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Scaffolding { /// diff --git a/src/EFCore.Design/Scaffolding/ScaffoldedModel.cs b/src/EFCore.Design/Scaffolding/ScaffoldedModel.cs index 6624bdaac63..e25f0cccf2a 100644 --- a/src/EFCore.Design/Scaffolding/ScaffoldedModel.cs +++ b/src/EFCore.Design/Scaffolding/ScaffoldedModel.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Scaffolding { diff --git a/src/EFCore.InMemory/Query/Internal/InMemoryExpressionTranslatingExpressionVisitor.cs b/src/EFCore.InMemory/Query/Internal/InMemoryExpressionTranslatingExpressionVisitor.cs index 30de4428c05..6f148ac7df2 100644 --- a/src/EFCore.InMemory/Query/Internal/InMemoryExpressionTranslatingExpressionVisitor.cs +++ b/src/EFCore.InMemory/Query/Internal/InMemoryExpressionTranslatingExpressionVisitor.cs @@ -1511,16 +1511,13 @@ when CanEvaluate(memberInitExpression): } } -#nullable disable - // Need unconstrainted nullable T - private static T ParameterValueExtractor(QueryContext context, string baseParameterName, IProperty property) + private static T? ParameterValueExtractor(QueryContext context, string baseParameterName, IProperty property) { var baseParameter = context.ParameterValues[baseParameterName]; - return baseParameter == null ? (T)(object)null : (T)property.GetGetter().GetClrValue(baseParameter); + return baseParameter == null ? (T?)(object?)null : (T?)property.GetGetter().GetClrValue(baseParameter); } - // Need unconstrainted nullable TProperty - private static List ParameterListValueExtractor( + private static List? ParameterListValueExtractor( QueryContext context, string baseParameterName, IProperty property) @@ -1531,9 +1528,8 @@ private static List ParameterListValueExtractor( } var getter = property.GetGetter(); - return baseListParameter.Select(e => e != null ? (TProperty)getter.GetClrValue(e) : (TProperty)(object)null).ToList(); + return baseListParameter.Select(e => e != null ? (TProperty?)getter.GetClrValue(e) : (TProperty?)(object?)null).ToList(); } -#nullable enable private static ConstantExpression GetValue(Expression expression) => Expression.Constant( diff --git a/src/EFCore.InMemory/Storage/Internal/IInMemoryStoreCache.cs b/src/EFCore.InMemory/Storage/Internal/IInMemoryStoreCache.cs index 3992a4ee98f..3e19fd58c54 100644 --- a/src/EFCore.InMemory/Storage/Internal/IInMemoryStoreCache.cs +++ b/src/EFCore.InMemory/Storage/Internal/IInMemoryStoreCache.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// diff --git a/src/EFCore.InMemory/Storage/Internal/InMemoryTableFactory.cs b/src/EFCore.InMemory/Storage/Internal/InMemoryTableFactory.cs index da998804ced..5adaa1a319b 100644 --- a/src/EFCore.InMemory/Storage/Internal/InMemoryTableFactory.cs +++ b/src/EFCore.InMemory/Storage/Internal/InMemoryTableFactory.cs @@ -3,11 +3,9 @@ using System; using System.Collections.Concurrent; -using System.Linq; using System.Reflection; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.InMemory.Infrastructure.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Utilities; diff --git a/src/EFCore.InMemory/ValueGeneration/Internal/IInMemoryIntegerValueGenerator.cs b/src/EFCore.InMemory/ValueGeneration/Internal/IInMemoryIntegerValueGenerator.cs index 8f60bb05d78..c3653a852db 100644 --- a/src/EFCore.InMemory/ValueGeneration/Internal/IInMemoryIntegerValueGenerator.cs +++ b/src/EFCore.InMemory/ValueGeneration/Internal/IInMemoryIntegerValueGenerator.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.InMemory.ValueGeneration.Internal { /// diff --git a/src/EFCore.Relational/Diagnostics/CommandCorrelatedEventData.cs b/src/EFCore.Relational/Diagnostics/CommandCorrelatedEventData.cs index d720f42ac85..fa10eba99d1 100644 --- a/src/EFCore.Relational/Diagnostics/CommandCorrelatedEventData.cs +++ b/src/EFCore.Relational/Diagnostics/CommandCorrelatedEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/CommandEndEventData.cs b/src/EFCore.Relational/Diagnostics/CommandEndEventData.cs index 0e237552ee1..49469a30573 100644 --- a/src/EFCore.Relational/Diagnostics/CommandEndEventData.cs +++ b/src/EFCore.Relational/Diagnostics/CommandEndEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/CommandErrorEventData.cs b/src/EFCore.Relational/Diagnostics/CommandErrorEventData.cs index 6c3187b1d01..6aca675cbc2 100644 --- a/src/EFCore.Relational/Diagnostics/CommandErrorEventData.cs +++ b/src/EFCore.Relational/Diagnostics/CommandErrorEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/CommandEventData.cs b/src/EFCore.Relational/Diagnostics/CommandEventData.cs index 31c4fca4e1c..03d34b641f7 100644 --- a/src/EFCore.Relational/Diagnostics/CommandEventData.cs +++ b/src/EFCore.Relational/Diagnostics/CommandEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/CommandExecutedEventData.cs b/src/EFCore.Relational/Diagnostics/CommandExecutedEventData.cs index b7ed5e77353..4e9263d7859 100644 --- a/src/EFCore.Relational/Diagnostics/CommandExecutedEventData.cs +++ b/src/EFCore.Relational/Diagnostics/CommandExecutedEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/ConnectionEndEventData.cs b/src/EFCore.Relational/Diagnostics/ConnectionEndEventData.cs index 67272c1271e..aa96a0e739d 100644 --- a/src/EFCore.Relational/Diagnostics/ConnectionEndEventData.cs +++ b/src/EFCore.Relational/Diagnostics/ConnectionEndEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/ConnectionErrorEventData.cs b/src/EFCore.Relational/Diagnostics/ConnectionErrorEventData.cs index 56c847f68e7..751638ec3e6 100644 --- a/src/EFCore.Relational/Diagnostics/ConnectionErrorEventData.cs +++ b/src/EFCore.Relational/Diagnostics/ConnectionErrorEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/ConnectionEventData.cs b/src/EFCore.Relational/Diagnostics/ConnectionEventData.cs index 65c47255ecf..5ea73e88607 100644 --- a/src/EFCore.Relational/Diagnostics/ConnectionEventData.cs +++ b/src/EFCore.Relational/Diagnostics/ConnectionEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/DataReaderDisposingEventData.cs b/src/EFCore.Relational/Diagnostics/DataReaderDisposingEventData.cs index dfdbb9a276d..cba3e257405 100644 --- a/src/EFCore.Relational/Diagnostics/DataReaderDisposingEventData.cs +++ b/src/EFCore.Relational/Diagnostics/DataReaderDisposingEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs index 15421dd9c95..cb0cf61c637 100644 --- a/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs @@ -5,7 +5,6 @@ using System.Data.Common; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs index 2a4c0a7b60a..f5534acfa48 100644 --- a/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs @@ -5,7 +5,6 @@ using System.Data.Common; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs index 98d05764349..36e558e5abd 100644 --- a/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs @@ -6,7 +6,6 @@ using System.Data.Common; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/MigrationTypeEventData.cs b/src/EFCore.Relational/Diagnostics/MigrationTypeEventData.cs index 13900a53941..1f599fe9543 100644 --- a/src/EFCore.Relational/Diagnostics/MigrationTypeEventData.cs +++ b/src/EFCore.Relational/Diagnostics/MigrationTypeEventData.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/TransactionEndEventData.cs b/src/EFCore.Relational/Diagnostics/TransactionEndEventData.cs index e8baedc8820..d3285cdc8e4 100644 --- a/src/EFCore.Relational/Diagnostics/TransactionEndEventData.cs +++ b/src/EFCore.Relational/Diagnostics/TransactionEndEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/TransactionEnlistedEventData.cs b/src/EFCore.Relational/Diagnostics/TransactionEnlistedEventData.cs index 74863a836e1..a508d6818c3 100644 --- a/src/EFCore.Relational/Diagnostics/TransactionEnlistedEventData.cs +++ b/src/EFCore.Relational/Diagnostics/TransactionEnlistedEventData.cs @@ -5,7 +5,6 @@ using System.Data.Common; using System.Diagnostics; using System.Transactions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/TransactionErrorEventData.cs b/src/EFCore.Relational/Diagnostics/TransactionErrorEventData.cs index 5e084471a2a..b62eac7f19c 100644 --- a/src/EFCore.Relational/Diagnostics/TransactionErrorEventData.cs +++ b/src/EFCore.Relational/Diagnostics/TransactionErrorEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/TransactionEventData.cs b/src/EFCore.Relational/Diagnostics/TransactionEventData.cs index a61a2cffdf3..ac41acc3867 100644 --- a/src/EFCore.Relational/Diagnostics/TransactionEventData.cs +++ b/src/EFCore.Relational/Diagnostics/TransactionEventData.cs @@ -4,7 +4,6 @@ using System; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Diagnostics/TransactionStartingEventData.cs b/src/EFCore.Relational/Diagnostics/TransactionStartingEventData.cs index 48be2faa2b6..20554e4e2c9 100644 --- a/src/EFCore.Relational/Diagnostics/TransactionStartingEventData.cs +++ b/src/EFCore.Relational/Diagnostics/TransactionStartingEventData.cs @@ -5,7 +5,6 @@ using System.Data; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore.Relational/Extensions/Internal/TupleExtensions.cs b/src/EFCore.Relational/Extensions/Internal/TupleExtensions.cs index 65cfb453e3e..c9b3623cb8e 100644 --- a/src/EFCore.Relational/Extensions/Internal/TupleExtensions.cs +++ b/src/EFCore.Relational/Extensions/Internal/TupleExtensions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore.Internal diff --git a/src/EFCore.Relational/Metadata/Builders/IConventionSequenceBuilder.cs b/src/EFCore.Relational/Metadata/Builders/IConventionSequenceBuilder.cs index a804e9d7fc1..16f95a2b253 100644 --- a/src/EFCore.Relational/Metadata/Builders/IConventionSequenceBuilder.cs +++ b/src/EFCore.Relational/Metadata/Builders/IConventionSequenceBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore.Relational/Metadata/IMutableSequence.cs b/src/EFCore.Relational/Metadata/IMutableSequence.cs index 5993c661840..f97c04d7081 100644 --- a/src/EFCore.Relational/Metadata/IMutableSequence.cs +++ b/src/EFCore.Relational/Metadata/IMutableSequence.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore.Relational/Metadata/Internal/ColumnNameComparer.cs b/src/EFCore.Relational/Metadata/Internal/ColumnNameComparer.cs index d2b6034d259..171ff8fdcbc 100644 --- a/src/EFCore.Relational/Metadata/Internal/ColumnNameComparer.cs +++ b/src/EFCore.Relational/Metadata/Internal/ColumnNameComparer.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore.Relational/Metadata/Internal/IRelationalPropertyOverrides.cs b/src/EFCore.Relational/Metadata/Internal/IRelationalPropertyOverrides.cs index a348f6dcc5a..fd72a55d485 100644 --- a/src/EFCore.Relational/Metadata/Internal/IRelationalPropertyOverrides.cs +++ b/src/EFCore.Relational/Metadata/Internal/IRelationalPropertyOverrides.cs @@ -3,8 +3,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunction.cs b/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunction.cs index b620bb736f5..e39dfb68582 100644 --- a/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunction.cs +++ b/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunction.cs @@ -1,10 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#nullable enable - -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunctionParameter.cs b/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunctionParameter.cs index 21a232c19ea..08ddcf470e5 100644 --- a/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunctionParameter.cs +++ b/src/EFCore.Relational/Metadata/Internal/IRuntimeDbFunctionParameter.cs @@ -1,10 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore.Relational/Metadata/Internal/RelationalEntityTypeExtensions.cs b/src/EFCore.Relational/Metadata/Internal/RelationalEntityTypeExtensions.cs index 29a0e941d43..9c626091988 100644 --- a/src/EFCore.Relational/Metadata/Internal/RelationalEntityTypeExtensions.cs +++ b/src/EFCore.Relational/Metadata/Internal/RelationalEntityTypeExtensions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore.Relational/Metadata/Internal/RelationalPropertyExtensions.cs b/src/EFCore.Relational/Metadata/Internal/RelationalPropertyExtensions.cs index 5aa84731135..d21ce586e63 100644 --- a/src/EFCore.Relational/Metadata/Internal/RelationalPropertyExtensions.cs +++ b/src/EFCore.Relational/Metadata/Internal/RelationalPropertyExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore.Relational/Metadata/SlimCheckConstraint.cs b/src/EFCore.Relational/Metadata/SlimCheckConstraint.cs index 10ee8b47313..2a6dcb8d79b 100644 --- a/src/EFCore.Relational/Metadata/SlimCheckConstraint.cs +++ b/src/EFCore.Relational/Metadata/SlimCheckConstraint.cs @@ -2,11 +2,8 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore.Relational/Metadata/SlimDbFunction.cs b/src/EFCore.Relational/Metadata/SlimDbFunction.cs index 971b76c1e68..4ae3e078f38 100644 --- a/src/EFCore.Relational/Metadata/SlimDbFunction.cs +++ b/src/EFCore.Relational/Metadata/SlimDbFunction.cs @@ -5,15 +5,12 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Query.SqlExpressions; using Microsoft.EntityFrameworkCore.Storage; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore.Relational/Metadata/SlimDbFunctionParameter.cs b/src/EFCore.Relational/Metadata/SlimDbFunctionParameter.cs index a4a9828eb98..969e06206c7 100644 --- a/src/EFCore.Relational/Metadata/SlimDbFunctionParameter.cs +++ b/src/EFCore.Relational/Metadata/SlimDbFunctionParameter.cs @@ -3,14 +3,11 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Storage; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore.Relational/Metadata/SlimRelationalPropertyOverrides.cs b/src/EFCore.Relational/Metadata/SlimRelationalPropertyOverrides.cs index 7dcf7e94f77..f0c5f0beb72 100644 --- a/src/EFCore.Relational/Metadata/SlimRelationalPropertyOverrides.cs +++ b/src/EFCore.Relational/Metadata/SlimRelationalPropertyOverrides.cs @@ -2,12 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata.Internal; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore.Relational/Metadata/SlimSequence.cs b/src/EFCore.Relational/Metadata/SlimSequence.cs index 421f6e25e5f..f140e2d75b4 100644 --- a/src/EFCore.Relational/Metadata/SlimSequence.cs +++ b/src/EFCore.Relational/Metadata/SlimSequence.cs @@ -3,11 +3,8 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; -#nullable enable - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationExtensions.cs b/src/EFCore.Relational/Migrations/Internal/MigrationExtensions.cs index 0bd193b1c3c..340caf400b3 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationExtensions.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Internal { diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs index fd9f065f02f..aec609a3cdd 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs @@ -2413,7 +2413,7 @@ protected virtual IEnumerable GetSchemas(IRelationalModel model) /// any release. You should only use it directly in your code with extreme caution and knowing that /// doing so can result in application failures when updating to a new Entity Framework Core release. /// - protected virtual object GetDefaultValue(Type type) + protected virtual object? GetDefaultValue(Type type) => type == typeof(string) ? string.Empty : type.IsArray diff --git a/src/EFCore.Relational/Migrations/Operations/ColumnOperation.cs b/src/EFCore.Relational/Migrations/Operations/ColumnOperation.cs index 42190127825..87c1b4bc632 100644 --- a/src/EFCore.Relational/Migrations/Operations/ColumnOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/ColumnOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/CreateSequenceOperation.cs b/src/EFCore.Relational/Migrations/Operations/CreateSequenceOperation.cs index b5d75353d1f..e85a03de03d 100644 --- a/src/EFCore.Relational/Migrations/Operations/CreateSequenceOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/CreateSequenceOperation.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/CreateTableOperation.cs b/src/EFCore.Relational/Migrations/Operations/CreateTableOperation.cs index 5a13ff6ea32..667ae5893fd 100644 --- a/src/EFCore.Relational/Migrations/Operations/CreateTableOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/CreateTableOperation.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DatabaseOperation.cs b/src/EFCore.Relational/Migrations/Operations/DatabaseOperation.cs index 52cfb6355d4..1cfeeb08b54 100644 --- a/src/EFCore.Relational/Migrations/Operations/DatabaseOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DatabaseOperation.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Operations { /// diff --git a/src/EFCore.Relational/Migrations/Operations/DropCheckConstraintOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropCheckConstraintOperation.cs index 72dde199bac..dd874fe8afa 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropCheckConstraintOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropCheckConstraintOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropColumnOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropColumnOperation.cs index 7bba2dd7c42..1f3aa9181ce 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropColumnOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropColumnOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropForeignKeyOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropForeignKeyOperation.cs index 42e81661eef..c43bd0a70ba 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropForeignKeyOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropForeignKeyOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropIndexOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropIndexOperation.cs index 2442504f8fc..018fe73cf82 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropIndexOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropIndexOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropPrimaryKeyOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropPrimaryKeyOperation.cs index 17bb947d3cd..760ef765d95 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropPrimaryKeyOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropPrimaryKeyOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropSchemaOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropSchemaOperation.cs index 63cb75e422e..6b7063a4dd2 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropSchemaOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropSchemaOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropSequenceOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropSequenceOperation.cs index 40de8ddbc3f..f039378ba38 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropSequenceOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropSequenceOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropTableOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropTableOperation.cs index c8391151c93..e6ad46e253c 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropTableOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropTableOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/DropUniqueConstraintOperation.cs b/src/EFCore.Relational/Migrations/Operations/DropUniqueConstraintOperation.cs index 86a0678249c..7006a0ddfbb 100644 --- a/src/EFCore.Relational/Migrations/Operations/DropUniqueConstraintOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/DropUniqueConstraintOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/EnsureSchemaOperation.cs b/src/EFCore.Relational/Migrations/Operations/EnsureSchemaOperation.cs index d026f3018d0..e29aa13a237 100644 --- a/src/EFCore.Relational/Migrations/Operations/EnsureSchemaOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/EnsureSchemaOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/RenameColumnOperation.cs b/src/EFCore.Relational/Migrations/Operations/RenameColumnOperation.cs index ce0fdf87d71..231bc229528 100644 --- a/src/EFCore.Relational/Migrations/Operations/RenameColumnOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/RenameColumnOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/RenameIndexOperation.cs b/src/EFCore.Relational/Migrations/Operations/RenameIndexOperation.cs index 272bb86e221..75515dd1914 100644 --- a/src/EFCore.Relational/Migrations/Operations/RenameIndexOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/RenameIndexOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/RenameSequenceOperation.cs b/src/EFCore.Relational/Migrations/Operations/RenameSequenceOperation.cs index 2f52d36a134..c91bc30426b 100644 --- a/src/EFCore.Relational/Migrations/Operations/RenameSequenceOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/RenameSequenceOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/RenameTableOperation.cs b/src/EFCore.Relational/Migrations/Operations/RenameTableOperation.cs index b274b77265d..cd8ca168c4f 100644 --- a/src/EFCore.Relational/Migrations/Operations/RenameTableOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/RenameTableOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/RestartSequenceOperation.cs b/src/EFCore.Relational/Migrations/Operations/RestartSequenceOperation.cs index 27007efe652..437ef090601 100644 --- a/src/EFCore.Relational/Migrations/Operations/RestartSequenceOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/RestartSequenceOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/SqlOperation.cs b/src/EFCore.Relational/Migrations/Operations/SqlOperation.cs index 371f2548936..6c09ead7104 100644 --- a/src/EFCore.Relational/Migrations/Operations/SqlOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/SqlOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.Relational/Migrations/Operations/TableOperation.cs b/src/EFCore.Relational/Migrations/Operations/TableOperation.cs index 4391df108f8..47430246f54 100644 --- a/src/EFCore.Relational/Migrations/Operations/TableOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/TableOperation.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Operations { /// diff --git a/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs b/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs index 24e63eec3d4..43a5946ea30 100644 --- a/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs +++ b/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data.Common; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Query { diff --git a/src/EFCore.Relational/Query/Internal/ResultContext.cs b/src/EFCore.Relational/Query/Internal/ResultContext.cs index 5b842d1e1db..d5a94a4e722 100644 --- a/src/EFCore.Relational/Query/Internal/ResultContext.cs +++ b/src/EFCore.Relational/Query/Internal/ResultContext.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Query.Internal { /// diff --git a/src/EFCore.Relational/Query/Internal/SingleQueryCollectionContext.cs b/src/EFCore.Relational/Query/Internal/SingleQueryCollectionContext.cs index 5bf62972453..f59425cf16e 100644 --- a/src/EFCore.Relational/Query/Internal/SingleQueryCollectionContext.cs +++ b/src/EFCore.Relational/Query/Internal/SingleQueryCollectionContext.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Query.Internal { /// diff --git a/src/EFCore.Relational/Query/Internal/SingleQueryResultCoordinator.cs b/src/EFCore.Relational/Query/Internal/SingleQueryResultCoordinator.cs index 48b8c5edd4c..8a6826e7107 100644 --- a/src/EFCore.Relational/Query/Internal/SingleQueryResultCoordinator.cs +++ b/src/EFCore.Relational/Query/Internal/SingleQueryResultCoordinator.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Query.Internal { diff --git a/src/EFCore.Relational/Query/Internal/SplitQueryCollectionContext.cs b/src/EFCore.Relational/Query/Internal/SplitQueryCollectionContext.cs index d6d859cea31..0607c768117 100644 --- a/src/EFCore.Relational/Query/Internal/SplitQueryCollectionContext.cs +++ b/src/EFCore.Relational/Query/Internal/SplitQueryCollectionContext.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Query.Internal { /// diff --git a/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs b/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs index 4c00f2370a4..e83b641f1de 100644 --- a/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs +++ b/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs @@ -1447,14 +1447,13 @@ when memberInitExpression.Bindings.SingleOrDefault( } } -#nullable disable - private static T ParameterValueExtractor(QueryContext context, string baseParameterName, IProperty property) + private static T? ParameterValueExtractor(QueryContext context, string baseParameterName, IProperty property) { var baseParameter = context.ParameterValues[baseParameterName]; - return baseParameter == null ? (T)(object)null : (T)property.GetGetter().GetClrValue(baseParameter); + return baseParameter == null ? (T?)(object?)null : (T?)property.GetGetter().GetClrValue(baseParameter); } - private static List ParameterListValueExtractor( + private static List? ParameterListValueExtractor( QueryContext context, string baseParameterName, IProperty property) @@ -1465,9 +1464,8 @@ private static List ParameterListValueExtractor( } var getter = property.GetGetter(); - return baseListParameter.Select(e => e != null ? (TProperty)getter.GetClrValue(e) : (TProperty)(object)null).ToList(); + return baseListParameter.Select(e => e != null ? (TProperty?)getter.GetClrValue(e) : (TProperty?)(object?)null).ToList(); } -#nullable enable private static bool CanEvaluate(Expression expression) { diff --git a/src/EFCore.Relational/Scaffolding/DatabaseModelFactoryOptions.cs b/src/EFCore.Relational/Scaffolding/DatabaseModelFactoryOptions.cs index 877b28bc019..e44f3aa7334 100644 --- a/src/EFCore.Relational/Scaffolding/DatabaseModelFactoryOptions.cs +++ b/src/EFCore.Relational/Scaffolding/DatabaseModelFactoryOptions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Scaffolding { diff --git a/src/EFCore.Relational/Storage/BoolTypeMapping.cs b/src/EFCore.Relational/Storage/BoolTypeMapping.cs index 364e843c8c8..683e6b5f564 100644 --- a/src/EFCore.Relational/Storage/BoolTypeMapping.cs +++ b/src/EFCore.Relational/Storage/BoolTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/ByteTypeMapping.cs b/src/EFCore.Relational/Storage/ByteTypeMapping.cs index 6446281db53..297a7597f31 100644 --- a/src/EFCore.Relational/Storage/ByteTypeMapping.cs +++ b/src/EFCore.Relational/Storage/ByteTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/DateTimeOffsetTypeMapping.cs b/src/EFCore.Relational/Storage/DateTimeOffsetTypeMapping.cs index 2554db05aed..6972f636566 100644 --- a/src/EFCore.Relational/Storage/DateTimeOffsetTypeMapping.cs +++ b/src/EFCore.Relational/Storage/DateTimeOffsetTypeMapping.cs @@ -3,7 +3,6 @@ using System; using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/DateTimeTypeMapping.cs b/src/EFCore.Relational/Storage/DateTimeTypeMapping.cs index 0e1281f54c3..80d83292c08 100644 --- a/src/EFCore.Relational/Storage/DateTimeTypeMapping.cs +++ b/src/EFCore.Relational/Storage/DateTimeTypeMapping.cs @@ -3,7 +3,6 @@ using System; using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/DecimalTypeMapping.cs b/src/EFCore.Relational/Storage/DecimalTypeMapping.cs index 24e36cd3656..1af85163a39 100644 --- a/src/EFCore.Relational/Storage/DecimalTypeMapping.cs +++ b/src/EFCore.Relational/Storage/DecimalTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/DoubleTypeMapping.cs b/src/EFCore.Relational/Storage/DoubleTypeMapping.cs index c506e8fbb48..2cba8180997 100644 --- a/src/EFCore.Relational/Storage/DoubleTypeMapping.cs +++ b/src/EFCore.Relational/Storage/DoubleTypeMapping.cs @@ -4,8 +4,6 @@ using System; using System.Data; using System.Globalization; -using Microsoft.EntityFrameworkCore.ChangeTracking; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/GuidTypeMapping.cs b/src/EFCore.Relational/Storage/GuidTypeMapping.cs index 3e415d20f9b..a3d02222a50 100644 --- a/src/EFCore.Relational/Storage/GuidTypeMapping.cs +++ b/src/EFCore.Relational/Storage/GuidTypeMapping.cs @@ -3,7 +3,6 @@ using System; using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/IRelationalCommandBuilder.cs b/src/EFCore.Relational/Storage/IRelationalCommandBuilder.cs index fd769c0ddc9..51149689d94 100644 --- a/src/EFCore.Relational/Storage/IRelationalCommandBuilder.cs +++ b/src/EFCore.Relational/Storage/IRelationalCommandBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/IRelationalParameter.cs b/src/EFCore.Relational/Storage/IRelationalParameter.cs index 40944dcd99a..dfe90147903 100644 --- a/src/EFCore.Relational/Storage/IRelationalParameter.cs +++ b/src/EFCore.Relational/Storage/IRelationalParameter.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Data.Common; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/IRelationalValueBufferFactory.cs b/src/EFCore.Relational/Storage/IRelationalValueBufferFactory.cs index 8e08e982415..cc9d1fa7fa3 100644 --- a/src/EFCore.Relational/Storage/IRelationalValueBufferFactory.cs +++ b/src/EFCore.Relational/Storage/IRelationalValueBufferFactory.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data.Common; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/IntTypeMapping.cs b/src/EFCore.Relational/Storage/IntTypeMapping.cs index 73a2e916dac..5ffcdad6736 100644 --- a/src/EFCore.Relational/Storage/IntTypeMapping.cs +++ b/src/EFCore.Relational/Storage/IntTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/LongTypeMapping.cs b/src/EFCore.Relational/Storage/LongTypeMapping.cs index 3e95a539094..72ade5d097e 100644 --- a/src/EFCore.Relational/Storage/LongTypeMapping.cs +++ b/src/EFCore.Relational/Storage/LongTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/RelationalExecutionStrategyExtensions.cs b/src/EFCore.Relational/Storage/RelationalExecutionStrategyExtensions.cs index 0bcc7b3036e..90eaf33bb20 100644 --- a/src/EFCore.Relational/Storage/RelationalExecutionStrategyExtensions.cs +++ b/src/EFCore.Relational/Storage/RelationalExecutionStrategyExtensions.cs @@ -5,7 +5,6 @@ using System.Data; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore.Storage diff --git a/src/EFCore.Relational/Storage/SByteTypeMapping.cs b/src/EFCore.Relational/Storage/SByteTypeMapping.cs index d4af67b2df5..eb9409e5fd3 100644 --- a/src/EFCore.Relational/Storage/SByteTypeMapping.cs +++ b/src/EFCore.Relational/Storage/SByteTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/ShortTypeMapping.cs b/src/EFCore.Relational/Storage/ShortTypeMapping.cs index f04e049665b..5ac78864c77 100644 --- a/src/EFCore.Relational/Storage/ShortTypeMapping.cs +++ b/src/EFCore.Relational/Storage/ShortTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/TimeSpanTypeMapping.cs b/src/EFCore.Relational/Storage/TimeSpanTypeMapping.cs index 767e99d5cf6..e5bf3aa8873 100644 --- a/src/EFCore.Relational/Storage/TimeSpanTypeMapping.cs +++ b/src/EFCore.Relational/Storage/TimeSpanTypeMapping.cs @@ -3,7 +3,6 @@ using System; using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/UIntTypeMapping.cs b/src/EFCore.Relational/Storage/UIntTypeMapping.cs index 3c39258872e..0d25faf702e 100644 --- a/src/EFCore.Relational/Storage/UIntTypeMapping.cs +++ b/src/EFCore.Relational/Storage/UIntTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/ULongTypeMapping.cs b/src/EFCore.Relational/Storage/ULongTypeMapping.cs index 1072b108cc1..9795a4677fd 100644 --- a/src/EFCore.Relational/Storage/ULongTypeMapping.cs +++ b/src/EFCore.Relational/Storage/ULongTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Storage/UShortTypeMapping.cs b/src/EFCore.Relational/Storage/UShortTypeMapping.cs index 48e16c0590d..c01d0833885 100644 --- a/src/EFCore.Relational/Storage/UShortTypeMapping.cs +++ b/src/EFCore.Relational/Storage/UShortTypeMapping.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Data; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore.Relational/Update/SingularModificationCommandBatch.cs b/src/EFCore.Relational/Update/SingularModificationCommandBatch.cs index d082418189e..afad4533323 100644 --- a/src/EFCore.Relational/Update/SingularModificationCommandBatch.cs +++ b/src/EFCore.Relational/Update/SingularModificationCommandBatch.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Update { /// diff --git a/src/EFCore.SqlServer/Migrations/Operations/SqlServerCreateDatabaseOperation.cs b/src/EFCore.SqlServer/Migrations/Operations/SqlServerCreateDatabaseOperation.cs index 1fcb0228dce..ba10a7e40f4 100644 --- a/src/EFCore.SqlServer/Migrations/Operations/SqlServerCreateDatabaseOperation.cs +++ b/src/EFCore.SqlServer/Migrations/Operations/SqlServerCreateDatabaseOperation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Migrations.Operations { diff --git a/src/EFCore.SqlServer/Migrations/Operations/SqlServerDropDatabaseOperation.cs b/src/EFCore.SqlServer/Migrations/Operations/SqlServerDropDatabaseOperation.cs index fec81595dbf..cdd10ac897d 100644 --- a/src/EFCore.SqlServer/Migrations/Operations/SqlServerDropDatabaseOperation.cs +++ b/src/EFCore.SqlServer/Migrations/Operations/SqlServerDropDatabaseOperation.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Migrations.Operations { /// diff --git a/src/EFCore/ChangeTracking/IDependentKeyValueFactory.cs b/src/EFCore/ChangeTracking/IDependentKeyValueFactory.cs index 8be925a7fae..39554c7d25b 100644 --- a/src/EFCore/ChangeTracking/IDependentKeyValueFactory.cs +++ b/src/EFCore/ChangeTracking/IDependentKeyValueFactory.cs @@ -7,7 +7,6 @@ using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Update; - namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// diff --git a/src/EFCore/ChangeTracking/Internal/ISnapshot.cs b/src/EFCore/ChangeTracking/Internal/ISnapshot.cs index 85d95eb8ae2..bda9c91d0eb 100644 --- a/src/EFCore/ChangeTracking/Internal/ISnapshot.cs +++ b/src/EFCore/ChangeTracking/Internal/ISnapshot.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// diff --git a/src/EFCore/ChangeTracking/Internal/MultiSnapshot.cs b/src/EFCore/ChangeTracking/Internal/MultiSnapshot.cs index 22fd638e840..4e472eec083 100644 --- a/src/EFCore/ChangeTracking/Internal/MultiSnapshot.cs +++ b/src/EFCore/ChangeTracking/Internal/MultiSnapshot.cs @@ -3,7 +3,6 @@ using System; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { diff --git a/src/EFCore/ChangeTracking/Internal/Snapshot.cs b/src/EFCore/ChangeTracking/Internal/Snapshot.cs index 071b8f56346..bae6526e540 100644 --- a/src/EFCore/ChangeTracking/Internal/Snapshot.cs +++ b/src/EFCore/ChangeTracking/Internal/Snapshot.cs @@ -3,7 +3,6 @@ using System; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { diff --git a/src/EFCore/ChangeTracking/Internal/StateManagerExtensions.cs b/src/EFCore/ChangeTracking/Internal/StateManagerExtensions.cs index 6a7bbbd487c..e765d8c5996 100644 --- a/src/EFCore/ChangeTracking/Internal/StateManagerExtensions.cs +++ b/src/EFCore/ChangeTracking/Internal/StateManagerExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { diff --git a/src/EFCore/ChangeTracking/Internal/ValueComparerExtensions.cs b/src/EFCore/ChangeTracking/Internal/ValueComparerExtensions.cs index 2f86fe35683..675c96459c6 100644 --- a/src/EFCore/ChangeTracking/Internal/ValueComparerExtensions.cs +++ b/src/EFCore/ChangeTracking/Internal/ValueComparerExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { diff --git a/src/EFCore/ChangeTracking/ObservableHashSet.cs b/src/EFCore/ChangeTracking/ObservableHashSet.cs index 78a6972bd63..3ac7d27b4d1 100644 --- a/src/EFCore/ChangeTracking/ObservableHashSet.cs +++ b/src/EFCore/ChangeTracking/ObservableHashSet.cs @@ -7,7 +7,6 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.ChangeTracking { diff --git a/src/EFCore/ChangeTracking/ValueComparerExtensions.cs b/src/EFCore/ChangeTracking/ValueComparerExtensions.cs index 74b54e457a6..c498bc8fd23 100644 --- a/src/EFCore/ChangeTracking/ValueComparerExtensions.cs +++ b/src/EFCore/ChangeTracking/ValueComparerExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// diff --git a/src/EFCore/Design/IDesignTimeDbContextFactory.cs b/src/EFCore/Design/IDesignTimeDbContextFactory.cs index 0ff39b87262..7d74091cb2d 100644 --- a/src/EFCore/Design/IDesignTimeDbContextFactory.cs +++ b/src/EFCore/Design/IDesignTimeDbContextFactory.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Design { /// diff --git a/src/EFCore/Diagnostics/BinaryExpressionEventData.cs b/src/EFCore/Diagnostics/BinaryExpressionEventData.cs index a3830576830..3ec677d05b5 100644 --- a/src/EFCore/Diagnostics/BinaryExpressionEventData.cs +++ b/src/EFCore/Diagnostics/BinaryExpressionEventData.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ContextInitializedEventData.cs b/src/EFCore/Diagnostics/ContextInitializedEventData.cs index e5561b1db9d..305dc97e2a1 100644 --- a/src/EFCore/Diagnostics/ContextInitializedEventData.cs +++ b/src/EFCore/Diagnostics/ContextInitializedEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/DbContextErrorEventData.cs b/src/EFCore/Diagnostics/DbContextErrorEventData.cs index 9ca146283c3..8471b728c8f 100644 --- a/src/EFCore/Diagnostics/DbContextErrorEventData.cs +++ b/src/EFCore/Diagnostics/DbContextErrorEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/DbContextEventData.cs b/src/EFCore/Diagnostics/DbContextEventData.cs index fe97863a0d3..165294c3047 100644 --- a/src/EFCore/Diagnostics/DbContextEventData.cs +++ b/src/EFCore/Diagnostics/DbContextEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/DbContextTypeErrorEventData.cs b/src/EFCore/Diagnostics/DbContextTypeErrorEventData.cs index 84fc829f15f..ff5c5aec328 100644 --- a/src/EFCore/Diagnostics/DbContextTypeErrorEventData.cs +++ b/src/EFCore/Diagnostics/DbContextTypeErrorEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/DbContextTypeEventData.cs b/src/EFCore/Diagnostics/DbContextTypeEventData.cs index 5aa795671c3..795150fea36 100644 --- a/src/EFCore/Diagnostics/DbContextTypeEventData.cs +++ b/src/EFCore/Diagnostics/DbContextTypeEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ExecutionStrategyEventData.cs b/src/EFCore/Diagnostics/ExecutionStrategyEventData.cs index 6353ae55089..611572a9c49 100644 --- a/src/EFCore/Diagnostics/ExecutionStrategyEventData.cs +++ b/src/EFCore/Diagnostics/ExecutionStrategyEventData.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Data.Common; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ExpressionEventData.cs b/src/EFCore/Diagnostics/ExpressionEventData.cs index fc9adb9acc0..c9832112396 100644 --- a/src/EFCore/Diagnostics/ExpressionEventData.cs +++ b/src/EFCore/Diagnostics/ExpressionEventData.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/IInterceptorAggregator.cs b/src/EFCore/Diagnostics/IInterceptorAggregator.cs index 76184cb0188..dc4dff93611 100644 --- a/src/EFCore/Diagnostics/IInterceptorAggregator.cs +++ b/src/EFCore/Diagnostics/IInterceptorAggregator.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs b/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs index 67076fe21b1..87cb589c2e6 100644 --- a/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs +++ b/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs @@ -4,7 +4,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/InterceptionResult`.cs b/src/EFCore/Diagnostics/InterceptionResult`.cs index 81773bc026b..1418691ca27 100644 --- a/src/EFCore/Diagnostics/InterceptionResult`.cs +++ b/src/EFCore/Diagnostics/InterceptionResult`.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/Internal/InvalidIncludePathEventData.cs b/src/EFCore/Diagnostics/Internal/InvalidIncludePathEventData.cs index 77f72ca8bdf..4fb5fa0a66f 100644 --- a/src/EFCore/Diagnostics/Internal/InvalidIncludePathEventData.cs +++ b/src/EFCore/Diagnostics/Internal/InvalidIncludePathEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/Internal/SaveChangesInterceptorAggregator.cs b/src/EFCore/Diagnostics/Internal/SaveChangesInterceptorAggregator.cs index 5cd5c4a2026..232b642d2a6 100644 --- a/src/EFCore/Diagnostics/Internal/SaveChangesInterceptorAggregator.cs +++ b/src/EFCore/Diagnostics/Internal/SaveChangesInterceptorAggregator.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal { diff --git a/src/EFCore/Diagnostics/SaveChangesCompletedEventData.cs b/src/EFCore/Diagnostics/SaveChangesCompletedEventData.cs index 7d154aacb2c..92a5d2fb038 100644 --- a/src/EFCore/Diagnostics/SaveChangesCompletedEventData.cs +++ b/src/EFCore/Diagnostics/SaveChangesCompletedEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ServiceProviderDebugInfoEventData.cs b/src/EFCore/Diagnostics/ServiceProviderDebugInfoEventData.cs index 3354bb6e0c8..18fb9929671 100644 --- a/src/EFCore/Diagnostics/ServiceProviderDebugInfoEventData.cs +++ b/src/EFCore/Diagnostics/ServiceProviderDebugInfoEventData.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ServiceProviderEventData.cs b/src/EFCore/Diagnostics/ServiceProviderEventData.cs index 449d331cbe3..c5e1541a523 100644 --- a/src/EFCore/Diagnostics/ServiceProviderEventData.cs +++ b/src/EFCore/Diagnostics/ServiceProviderEventData.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/ServiceProvidersEventData.cs b/src/EFCore/Diagnostics/ServiceProvidersEventData.cs index 1748c893bb7..8211ca6abf3 100644 --- a/src/EFCore/Diagnostics/ServiceProvidersEventData.cs +++ b/src/EFCore/Diagnostics/ServiceProvidersEventData.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Diagnostics/TwoUnmappedPropertyCollectionsEventData.cs b/src/EFCore/Diagnostics/TwoUnmappedPropertyCollectionsEventData.cs index 996495fb9c3..6af15dabc98 100644 --- a/src/EFCore/Diagnostics/TwoUnmappedPropertyCollectionsEventData.cs +++ b/src/EFCore/Diagnostics/TwoUnmappedPropertyCollectionsEventData.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Diagnostics { diff --git a/src/EFCore/Extensions/Internal/MethodInfoExtensions.cs b/src/EFCore/Extensions/Internal/MethodInfoExtensions.cs index b8f02854ed7..fdb649cf309 100644 --- a/src/EFCore/Extensions/Internal/MethodInfoExtensions.cs +++ b/src/EFCore/Extensions/Internal/MethodInfoExtensions.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore.Internal diff --git a/src/EFCore/Extensions/Internal/QueryableExtensions.cs b/src/EFCore/Extensions/Internal/QueryableExtensions.cs index 99f5d6d9426..a07dde3db77 100644 --- a/src/EFCore/Extensions/Internal/QueryableExtensions.cs +++ b/src/EFCore/Extensions/Internal/QueryableExtensions.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Linq.Expressions; using System.Reflection; -using JetBrains.Annotations; // ReSharper disable CheckNamespace namespace Microsoft.EntityFrameworkCore.Internal diff --git a/src/EFCore/Extensions/Internal/TypeExtensions.cs b/src/EFCore/Extensions/Internal/TypeExtensions.cs index e62ffb63f4b..70b059f8700 100644 --- a/src/EFCore/Extensions/Internal/TypeExtensions.cs +++ b/src/EFCore/Extensions/Internal/TypeExtensions.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Reflection; using System.Text; -using JetBrains.Annotations; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore.Internal diff --git a/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs b/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs index 097e932f4ac..6bd7ea09a35 100644 --- a/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs +++ b/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/DebugView.cs b/src/EFCore/Infrastructure/DebugView.cs index 506c8dc3559..2effa2d2e37 100644 --- a/src/EFCore/Infrastructure/DebugView.cs +++ b/src/EFCore/Infrastructure/DebugView.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/ExpressionExtensions.cs b/src/EFCore/Infrastructure/ExpressionExtensions.cs index 490b0d45a01..be73ff3b635 100644 --- a/src/EFCore/Infrastructure/ExpressionExtensions.cs +++ b/src/EFCore/Infrastructure/ExpressionExtensions.cs @@ -83,7 +83,6 @@ public static Expression Assign( } private static readonly Type _assignBinaryExpressionType - // TODO-Nullable: Somethings are unexplainable = typeof(Expression).Assembly.GetType("System.Linq.Expressions.AssignBinaryExpression", throwOnError: true)!; /// diff --git a/src/EFCore/Infrastructure/IAnnotatable.cs b/src/EFCore/Infrastructure/IAnnotatable.cs index 092d91a37a8..337851b5748 100644 --- a/src/EFCore/Infrastructure/IAnnotatable.cs +++ b/src/EFCore/Infrastructure/IAnnotatable.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs b/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs index 03a1747a814..4633fdd64ac 100644 --- a/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs +++ b/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Infrastructure { /// diff --git a/src/EFCore/Infrastructure/IndentedStringBuilder.cs b/src/EFCore/Infrastructure/IndentedStringBuilder.cs index 9a30b1c7109..0df046e5f0d 100644 --- a/src/EFCore/Infrastructure/IndentedStringBuilder.cs +++ b/src/EFCore/Infrastructure/IndentedStringBuilder.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Text; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/Internal/DbContextOptionsExtensions.cs b/src/EFCore/Infrastructure/Internal/DbContextOptionsExtensions.cs index 0d457c02cde..d915eeb15ff 100644 --- a/src/EFCore/Infrastructure/Internal/DbContextOptionsExtensions.cs +++ b/src/EFCore/Infrastructure/Internal/DbContextOptionsExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { diff --git a/src/EFCore/Infrastructure/MethodInfoExtensions.cs b/src/EFCore/Infrastructure/MethodInfoExtensions.cs index d61cd5d48fe..210383f9ff8 100644 --- a/src/EFCore/Infrastructure/MethodInfoExtensions.cs +++ b/src/EFCore/Infrastructure/MethodInfoExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/ModelCacheKey.cs b/src/EFCore/Infrastructure/ModelCacheKey.cs index cf40c438b36..090e169ed13 100644 --- a/src/EFCore/Infrastructure/ModelCacheKey.cs +++ b/src/EFCore/Infrastructure/ModelCacheKey.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/TypeExtensions.cs b/src/EFCore/Infrastructure/TypeExtensions.cs index bb4da34318a..7fe6c48a2d2 100644 --- a/src/EFCore/Infrastructure/TypeExtensions.cs +++ b/src/EFCore/Infrastructure/TypeExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Infrastructure/Uniquifier.cs b/src/EFCore/Infrastructure/Uniquifier.cs index 8a4cef60bb1..15072e3e746 100644 --- a/src/EFCore/Infrastructure/Uniquifier.cs +++ b/src/EFCore/Infrastructure/Uniquifier.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Text; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Infrastructure { diff --git a/src/EFCore/Internal/DbContextLease.cs b/src/EFCore/Internal/DbContextLease.cs index 9396f64c948..bc35429004b 100644 --- a/src/EFCore/Internal/DbContextLease.cs +++ b/src/EFCore/Internal/DbContextLease.cs @@ -3,8 +3,6 @@ using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Internal { diff --git a/src/EFCore/Internal/IDbContextPool.cs b/src/EFCore/Internal/IDbContextPool.cs index 799b997e9bc..9d3b171d46d 100644 --- a/src/EFCore/Internal/IDbContextPool.cs +++ b/src/EFCore/Internal/IDbContextPool.cs @@ -3,7 +3,6 @@ using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Internal { diff --git a/src/EFCore/Internal/IDbSetCache.cs b/src/EFCore/Internal/IDbSetCache.cs index 7978270e04d..a9f71bb8ee7 100644 --- a/src/EFCore/Internal/IDbSetCache.cs +++ b/src/EFCore/Internal/IDbSetCache.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Internal { diff --git a/src/EFCore/Internal/IPatchServiceInjectionSite.cs b/src/EFCore/Internal/IPatchServiceInjectionSite.cs index c72c4e91674..80a5d84a3d9 100644 --- a/src/EFCore/Internal/IPatchServiceInjectionSite.cs +++ b/src/EFCore/Internal/IPatchServiceInjectionSite.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Internal { diff --git a/src/EFCore/Internal/PooledDbContextFactory.cs b/src/EFCore/Internal/PooledDbContextFactory.cs index 48a77ceb476..be103bc4291 100644 --- a/src/EFCore/Internal/PooledDbContextFactory.cs +++ b/src/EFCore/Internal/PooledDbContextFactory.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Internal { /// diff --git a/src/EFCore/Internal/ScopedDbContextLease.cs b/src/EFCore/Internal/ScopedDbContextLease.cs index 7d73c74feba..72fd3dce07d 100644 --- a/src/EFCore/Internal/ScopedDbContextLease.cs +++ b/src/EFCore/Internal/ScopedDbContextLease.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Internal { diff --git a/src/EFCore/Metadata/Builders/IConventionAnnotatableBuilder.cs b/src/EFCore/Metadata/Builders/IConventionAnnotatableBuilder.cs index 1114dba27b6..c595de779e1 100644 --- a/src/EFCore/Metadata/Builders/IConventionAnnotatableBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionAnnotatableBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionEntityTypeBuilder.cs b/src/EFCore/Metadata/Builders/IConventionEntityTypeBuilder.cs index ddd0e755e3a..6ed57fcc2cd 100644 --- a/src/EFCore/Metadata/Builders/IConventionEntityTypeBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionEntityTypeBuilder.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionForeignKeyBuilder.cs b/src/EFCore/Metadata/Builders/IConventionForeignKeyBuilder.cs index 054c3e36e89..5dd784f5615 100644 --- a/src/EFCore/Metadata/Builders/IConventionForeignKeyBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionForeignKeyBuilder.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs b/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs index 9a504a95526..a5c209c615f 100644 --- a/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionNavigationBuilder.cs b/src/EFCore/Metadata/Builders/IConventionNavigationBuilder.cs index 90ed0d4d9f6..0c568dd1ba8 100644 --- a/src/EFCore/Metadata/Builders/IConventionNavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionNavigationBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionServicePropertyBuilder.cs b/src/EFCore/Metadata/Builders/IConventionServicePropertyBuilder.cs index 6a987ab71c2..15e11fd9e59 100644 --- a/src/EFCore/Metadata/Builders/IConventionServicePropertyBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionServicePropertyBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Builders/IConventionSkipNavigationBuilder.cs b/src/EFCore/Metadata/Builders/IConventionSkipNavigationBuilder.cs index 82b0a0db6a7..d3d9d88b00f 100644 --- a/src/EFCore/Metadata/Builders/IConventionSkipNavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionSkipNavigationBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Builders { diff --git a/src/EFCore/Metadata/Conventions/IConventionBatch.cs b/src/EFCore/Metadata/Conventions/IConventionBatch.cs index 6e45d9ce480..07b734ee08b 100644 --- a/src/EFCore/Metadata/Conventions/IConventionBatch.cs +++ b/src/EFCore/Metadata/Conventions/IConventionBatch.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { diff --git a/src/EFCore/Metadata/Conventions/IConventionContext`.cs b/src/EFCore/Metadata/Conventions/IConventionContext`.cs index 5f115fc3df3..c0817e39158 100644 --- a/src/EFCore/Metadata/Conventions/IConventionContext`.cs +++ b/src/EFCore/Metadata/Conventions/IConventionContext`.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// diff --git a/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs b/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs index a53d11e35f2..44f20e627c6 100644 --- a/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs +++ b/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// diff --git a/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs b/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs index 72cb6c4006e..faabbde971f 100644 --- a/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs +++ b/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal { /// diff --git a/src/EFCore/Metadata/Conventions/Internal/ConventionDispatcher.ConventionScope.cs b/src/EFCore/Metadata/Conventions/Internal/ConventionDispatcher.ConventionScope.cs index 8f66ae457b9..2e53788d9b0 100644 --- a/src/EFCore/Metadata/Conventions/Internal/ConventionDispatcher.ConventionScope.cs +++ b/src/EFCore/Metadata/Conventions/Internal/ConventionDispatcher.ConventionScope.cs @@ -194,7 +194,6 @@ public int GetLeafCount() public abstract FieldInfo? OnPropertyFieldChanged( IConventionPropertyBuilder propertyBuilder, - // TODO-NULLABLE: Verify missing annotation FieldInfo? newFieldInfo, FieldInfo? oldFieldInfo); diff --git a/src/EFCore/Metadata/IClrCollectionAccessor.cs b/src/EFCore/Metadata/IClrCollectionAccessor.cs index d9690bb0d1b..600269e913d 100644 --- a/src/EFCore/Metadata/IClrCollectionAccessor.cs +++ b/src/EFCore/Metadata/IClrCollectionAccessor.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore/Metadata/IClrPropertyGetter.cs b/src/EFCore/Metadata/IClrPropertyGetter.cs index 369d5a20e4d..c1d84ae123d 100644 --- a/src/EFCore/Metadata/IClrPropertyGetter.cs +++ b/src/EFCore/Metadata/IClrPropertyGetter.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore/Metadata/IClrPropertySetter.cs b/src/EFCore/Metadata/IClrPropertySetter.cs index 945550fd388..980ea4f0c73 100644 --- a/src/EFCore/Metadata/IClrPropertySetter.cs +++ b/src/EFCore/Metadata/IClrPropertySetter.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore/Metadata/IMutableForeignKey.cs b/src/EFCore/Metadata/IMutableForeignKey.cs index 52715fc48fd..8143bb815d4 100644 --- a/src/EFCore/Metadata/IMutableForeignKey.cs +++ b/src/EFCore/Metadata/IMutableForeignKey.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore/Metadata/IMutableNavigation.cs b/src/EFCore/Metadata/IMutableNavigation.cs index 9cf9bd909a2..d6c820e871b 100644 --- a/src/EFCore/Metadata/IMutableNavigation.cs +++ b/src/EFCore/Metadata/IMutableNavigation.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore/Metadata/IMutableServiceProperty.cs b/src/EFCore/Metadata/IMutableServiceProperty.cs index 4d692b4d1f0..a73891ee6c1 100644 --- a/src/EFCore/Metadata/IMutableServiceProperty.cs +++ b/src/EFCore/Metadata/IMutableServiceProperty.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata { /// diff --git a/src/EFCore/Metadata/IMutableSkipNavigation.cs b/src/EFCore/Metadata/IMutableSkipNavigation.cs index c105e077dce..0ecbc272b1f 100644 --- a/src/EFCore/Metadata/IMutableSkipNavigation.cs +++ b/src/EFCore/Metadata/IMutableSkipNavigation.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore/Metadata/Internal/ClrAccessorFactory.cs b/src/EFCore/Metadata/Internal/ClrAccessorFactory.cs index 5f516b961cb..139ad59f8ed 100644 --- a/src/EFCore/Metadata/Internal/ClrAccessorFactory.cs +++ b/src/EFCore/Metadata/Internal/ClrAccessorFactory.cs @@ -4,7 +4,6 @@ using System; using System.Linq; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/ClrPropertyGetter.cs b/src/EFCore/Metadata/Internal/ClrPropertyGetter.cs index 68ab8263b4a..2302859406d 100644 --- a/src/EFCore/Metadata/Internal/ClrPropertyGetter.cs +++ b/src/EFCore/Metadata/Internal/ClrPropertyGetter.cs @@ -3,7 +3,6 @@ using System; using System.Runtime.CompilerServices; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/ClrPropertySetter.cs b/src/EFCore/Metadata/Internal/ClrPropertySetter.cs index 9482b63cd40..f319ba32192 100644 --- a/src/EFCore/Metadata/Internal/ClrPropertySetter.cs +++ b/src/EFCore/Metadata/Internal/ClrPropertySetter.cs @@ -3,7 +3,6 @@ using System; using System.Runtime.CompilerServices; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/IReferenceRoot.cs b/src/EFCore/Metadata/Internal/IReferenceRoot.cs index bd373f15363..a9e5f401dc1 100644 --- a/src/EFCore/Metadata/Internal/IReferenceRoot.cs +++ b/src/EFCore/Metadata/Internal/IReferenceRoot.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/IRuntimePropertyBase.cs b/src/EFCore/Metadata/Internal/IRuntimePropertyBase.cs index 51e6c23d726..7a6f56cf330 100644 --- a/src/EFCore/Metadata/Internal/IRuntimePropertyBase.cs +++ b/src/EFCore/Metadata/Internal/IRuntimePropertyBase.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/KeyExtensions.cs b/src/EFCore/Metadata/Internal/KeyExtensions.cs index d1709180c46..69542f8c3c9 100644 --- a/src/EFCore/Metadata/Internal/KeyExtensions.cs +++ b/src/EFCore/Metadata/Internal/KeyExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/ModelExtensions.cs b/src/EFCore/Metadata/Internal/ModelExtensions.cs index 1e851aef453..91d6505d566 100644 --- a/src/EFCore/Metadata/Internal/ModelExtensions.cs +++ b/src/EFCore/Metadata/Internal/ModelExtensions.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/NavigationExtensions.cs b/src/EFCore/Metadata/Internal/NavigationExtensions.cs index 755175d6ed1..5dba06d1272 100644 --- a/src/EFCore/Metadata/Internal/NavigationExtensions.cs +++ b/src/EFCore/Metadata/Internal/NavigationExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/NullableEnumClrPropertySetter.cs b/src/EFCore/Metadata/Internal/NullableEnumClrPropertySetter.cs index 65419596fbd..4dd3232a62a 100644 --- a/src/EFCore/Metadata/Internal/NullableEnumClrPropertySetter.cs +++ b/src/EFCore/Metadata/Internal/NullableEnumClrPropertySetter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/PropertiesSnapshot.cs b/src/EFCore/Metadata/Internal/PropertiesSnapshot.cs index f4acf2b622c..6c55f304b45 100644 --- a/src/EFCore/Metadata/Internal/PropertiesSnapshot.cs +++ b/src/EFCore/Metadata/Internal/PropertiesSnapshot.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/PropertyAccessorsFactory.cs b/src/EFCore/Metadata/Internal/PropertyAccessorsFactory.cs index 2168be86486..dd7be4afc44 100644 --- a/src/EFCore/Metadata/Internal/PropertyAccessorsFactory.cs +++ b/src/EFCore/Metadata/Internal/PropertyAccessorsFactory.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; using JetBrains.Annotations; diff --git a/src/EFCore/Metadata/Internal/PropertyNameComparer.cs b/src/EFCore/Metadata/Internal/PropertyNameComparer.cs index 0a5fa930e16..d2ddc7a16a8 100644 --- a/src/EFCore/Metadata/Internal/PropertyNameComparer.cs +++ b/src/EFCore/Metadata/Internal/PropertyNameComparer.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/Reference.cs b/src/EFCore/Metadata/Internal/Reference.cs index 7586d4968e6..173e45d1069 100644 --- a/src/EFCore/Metadata/Internal/Reference.cs +++ b/src/EFCore/Metadata/Internal/Reference.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/RelationshipSnapshot.cs b/src/EFCore/Metadata/Internal/RelationshipSnapshot.cs index 79d4acaf5b5..7dbd7f1412e 100644 --- a/src/EFCore/Metadata/Internal/RelationshipSnapshot.cs +++ b/src/EFCore/Metadata/Internal/RelationshipSnapshot.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/SkipNavigationExtensions.cs b/src/EFCore/Metadata/Internal/SkipNavigationExtensions.cs index 579b208049d..34ba5be2ea2 100644 --- a/src/EFCore/Metadata/Internal/SkipNavigationExtensions.cs +++ b/src/EFCore/Metadata/Internal/SkipNavigationExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// diff --git a/src/EFCore/Metadata/Internal/TypeBaseExtensions.cs b/src/EFCore/Metadata/Internal/TypeBaseExtensions.cs index 6be5bbd770b..c26b371f1e5 100644 --- a/src/EFCore/Metadata/Internal/TypeBaseExtensions.cs +++ b/src/EFCore/Metadata/Internal/TypeBaseExtensions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/Internal/TypeIdentity.cs b/src/EFCore/Metadata/Internal/TypeIdentity.cs index 274eaf08f13..fbeebd9bdd4 100644 --- a/src/EFCore/Metadata/Internal/TypeIdentity.cs +++ b/src/EFCore/Metadata/Internal/TypeIdentity.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata.Internal { diff --git a/src/EFCore/Metadata/MemberIdentity.cs b/src/EFCore/Metadata/MemberIdentity.cs index 4e1b7cd3ea4..73454c01459 100644 --- a/src/EFCore/Metadata/MemberIdentity.cs +++ b/src/EFCore/Metadata/MemberIdentity.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/src/EFCore/Query/IPrintableExpression.cs b/src/EFCore/Query/IPrintableExpression.cs index 3b58351a0fc..809b8e39315 100644 --- a/src/EFCore/Query/IPrintableExpression.cs +++ b/src/EFCore/Query/IPrintableExpression.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Query { /// diff --git a/src/EFCore/Query/Internal/IParameterValues.cs b/src/EFCore/Query/Internal/IParameterValues.cs index 870419cc1fa..889008c6f84 100644 --- a/src/EFCore/Query/Internal/IParameterValues.cs +++ b/src/EFCore/Query/Internal/IParameterValues.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Query.Internal { diff --git a/src/EFCore/Query/Internal/QueryDebugView.cs b/src/EFCore/Query/Internal/QueryDebugView.cs index a4aa5f97fa4..554f23d46c0 100644 --- a/src/EFCore/Query/Internal/QueryDebugView.cs +++ b/src/EFCore/Query/Internal/QueryDebugView.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Query.Internal { diff --git a/src/EFCore/SaveChangesFailedEventArgs.cs b/src/EFCore/SaveChangesFailedEventArgs.cs index 635c4507afe..a315b289ca4 100644 --- a/src/EFCore/SaveChangesFailedEventArgs.cs +++ b/src/EFCore/SaveChangesFailedEventArgs.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore { diff --git a/src/EFCore/Storage/ExecutionResult.cs b/src/EFCore/Storage/ExecutionResult.cs index 8d31a65779e..b64b1911278 100644 --- a/src/EFCore/Storage/ExecutionResult.cs +++ b/src/EFCore/Storage/ExecutionResult.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using JetBrains.Annotations; - namespace Microsoft.EntityFrameworkCore.Storage { /// diff --git a/src/EFCore/Storage/IExecutionStrategy.cs b/src/EFCore/Storage/IExecutionStrategy.cs index 7d80b2ecef0..7a8fa28052f 100644 --- a/src/EFCore/Storage/IExecutionStrategy.cs +++ b/src/EFCore/Storage/IExecutionStrategy.cs @@ -4,7 +4,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore/Storage/ITransactionEnlistmentManager.cs b/src/EFCore/Storage/ITransactionEnlistmentManager.cs index 5c6d70858e1..d2f914d2666 100644 --- a/src/EFCore/Storage/ITransactionEnlistmentManager.cs +++ b/src/EFCore/Storage/ITransactionEnlistmentManager.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Transactions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore/Storage/NonRetryingExecutionStrategy.cs b/src/EFCore/Storage/NonRetryingExecutionStrategy.cs index 7f584d20046..c3bad4cbe88 100644 --- a/src/EFCore/Storage/NonRetryingExecutionStrategy.cs +++ b/src/EFCore/Storage/NonRetryingExecutionStrategy.cs @@ -4,7 +4,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore/Storage/RetryLimitExceededException.cs b/src/EFCore/Storage/RetryLimitExceededException.cs index a13bb5b0d61..d35e84881ed 100644 --- a/src/EFCore/Storage/RetryLimitExceededException.cs +++ b/src/EFCore/Storage/RetryLimitExceededException.cs @@ -3,7 +3,6 @@ using System; using System.Runtime.Serialization; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage { diff --git a/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs b/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs index 44f407812f5..007a7f35053 100644 --- a/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs @@ -3,7 +3,6 @@ using System; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/BoolToZeroOneConverter.cs b/src/EFCore/Storage/ValueConversion/BoolToZeroOneConverter.cs index 901ade40812..ca34c539c8e 100644 --- a/src/EFCore/Storage/ValueConversion/BoolToZeroOneConverter.cs +++ b/src/EFCore/Storage/ValueConversion/BoolToZeroOneConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/BytesToStringConverter.cs b/src/EFCore/Storage/ValueConversion/BytesToStringConverter.cs index a4813a9c0d4..ca909130755 100644 --- a/src/EFCore/Storage/ValueConversion/BytesToStringConverter.cs +++ b/src/EFCore/Storage/ValueConversion/BytesToStringConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/CastingConverter.cs b/src/EFCore/Storage/ValueConversion/CastingConverter.cs index 4b2eacac906..e03a992cdb0 100644 --- a/src/EFCore/Storage/ValueConversion/CastingConverter.cs +++ b/src/EFCore/Storage/ValueConversion/CastingConverter.cs @@ -3,7 +3,6 @@ using System; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBinaryConverter.cs b/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBinaryConverter.cs index 3493fc6d0e4..d127b09fb25 100644 --- a/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBinaryConverter.cs +++ b/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBinaryConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBytesConverter.cs index c71ef91ddfb..febf8747cec 100644 --- a/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/DateTimeOffsetToBytesConverter.cs @@ -3,7 +3,6 @@ using System; using System.Linq; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/DateTimeToBinaryConverter.cs b/src/EFCore/Storage/ValueConversion/DateTimeToBinaryConverter.cs index f2117c894d5..7c8c4521ac3 100644 --- a/src/EFCore/Storage/ValueConversion/DateTimeToBinaryConverter.cs +++ b/src/EFCore/Storage/ValueConversion/DateTimeToBinaryConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/DateTimeToTicksConverter.cs b/src/EFCore/Storage/ValueConversion/DateTimeToTicksConverter.cs index 820409a2473..74be196c61a 100644 --- a/src/EFCore/Storage/ValueConversion/DateTimeToTicksConverter.cs +++ b/src/EFCore/Storage/ValueConversion/DateTimeToTicksConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/IPAddressToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/IPAddressToBytesConverter.cs index 8c204f49e6e..36096e0807b 100644 --- a/src/EFCore/Storage/ValueConversion/IPAddressToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/IPAddressToBytesConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/IPAddressToStringConverter.cs b/src/EFCore/Storage/ValueConversion/IPAddressToStringConverter.cs index 65f82695608..05f98213477 100644 --- a/src/EFCore/Storage/ValueConversion/IPAddressToStringConverter.cs +++ b/src/EFCore/Storage/ValueConversion/IPAddressToStringConverter.cs @@ -4,7 +4,6 @@ using System; using System.Linq.Expressions; using System.Net; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringCharConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringCharConverter.cs index e3a5d2909f4..ea500c08815 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringCharConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringCharConverter.cs @@ -4,7 +4,6 @@ using System; using System.Globalization; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeConverter.cs index 03e9ae467af..62d0c90303b 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeConverter.cs @@ -4,7 +4,6 @@ using System; using System.Globalization; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeOffsetConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeOffsetConverter.cs index 2f571806a20..d61770a8e4e 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeOffsetConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringDateTimeOffsetConverter.cs @@ -4,7 +4,6 @@ using System; using System.Globalization; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringNumberConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringNumberConverter.cs index 0c3e9fa17b3..e18890fc36a 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringNumberConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringNumberConverter.cs @@ -4,7 +4,6 @@ using System; using System.Globalization; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringTimeSpanConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringTimeSpanConverter.cs index 3e8eb11f5b6..6bb35ed042a 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringTimeSpanConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringTimeSpanConverter.cs @@ -4,7 +4,6 @@ using System; using System.Globalization; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/Internal/StringUriConverter.cs b/src/EFCore/Storage/ValueConversion/Internal/StringUriConverter.cs index 39415277ec7..23037a82271 100644 --- a/src/EFCore/Storage/ValueConversion/Internal/StringUriConverter.cs +++ b/src/EFCore/Storage/ValueConversion/Internal/StringUriConverter.cs @@ -3,7 +3,6 @@ using System; using System.Linq.Expressions; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal { diff --git a/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs index 5b2bd489cad..c9669309c3d 100644 --- a/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs @@ -4,7 +4,6 @@ using System; using System.Linq.Expressions; using System.Reflection; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/PhysicalAddressToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/PhysicalAddressToBytesConverter.cs index 24356fe7b1b..ea61c0a60d2 100644 --- a/src/EFCore/Storage/ValueConversion/PhysicalAddressToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/PhysicalAddressToBytesConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net.NetworkInformation; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/PhysicalAddressToStringConverter.cs b/src/EFCore/Storage/ValueConversion/PhysicalAddressToStringConverter.cs index 830c354a53d..8a31ceb0c1a 100644 --- a/src/EFCore/Storage/ValueConversion/PhysicalAddressToStringConverter.cs +++ b/src/EFCore/Storage/ValueConversion/PhysicalAddressToStringConverter.cs @@ -4,7 +4,6 @@ using System; using System.Linq.Expressions; using System.Net.NetworkInformation; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/StringToBoolConverter.cs b/src/EFCore/Storage/ValueConversion/StringToBoolConverter.cs index fbf0288f24e..f9b2b46c072 100644 --- a/src/EFCore/Storage/ValueConversion/StringToBoolConverter.cs +++ b/src/EFCore/Storage/ValueConversion/StringToBoolConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/StringToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/StringToBytesConverter.cs index 7aad7edf9ac..12c21241167 100644 --- a/src/EFCore/Storage/ValueConversion/StringToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/StringToBytesConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/EFCore/Storage/ValueConversion/TimeSpanToTicksConverter.cs b/src/EFCore/Storage/ValueConversion/TimeSpanToTicksConverter.cs index 74f73f66f12..9d607ee1b16 100644 --- a/src/EFCore/Storage/ValueConversion/TimeSpanToTicksConverter.cs +++ b/src/EFCore/Storage/ValueConversion/TimeSpanToTicksConverter.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using JetBrains.Annotations; namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { diff --git a/src/Shared/DictionaryExtensions.cs b/src/Shared/DictionaryExtensions.cs index 64756544560..540f394a9ce 100644 --- a/src/Shared/DictionaryExtensions.cs +++ b/src/Shared/DictionaryExtensions.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/DisposableExtensions.cs b/src/Shared/DisposableExtensions.cs index dfbdad13e2d..ffb7cbde906 100644 --- a/src/Shared/DisposableExtensions.cs +++ b/src/Shared/DisposableExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/EnumerableExtensions.cs b/src/Shared/EnumerableExtensions.cs index 7b92fb20304..727a50681ab 100644 --- a/src/Shared/EnumerableExtensions.cs +++ b/src/Shared/EnumerableExtensions.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/ExpressionExtensions.cs b/src/Shared/ExpressionExtensions.cs index 05ed5df801f..a764a639b46 100644 --- a/src/Shared/ExpressionExtensions.cs +++ b/src/Shared/ExpressionExtensions.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/Graph.cs b/src/Shared/Graph.cs index 0fa82ea05c7..ad965c412e0 100644 --- a/src/Shared/Graph.cs +++ b/src/Shared/Graph.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/PropertyInfoExtensions.cs b/src/Shared/PropertyInfoExtensions.cs index 1a221225503..cd02f481b2b 100644 --- a/src/Shared/PropertyInfoExtensions.cs +++ b/src/Shared/PropertyInfoExtensions.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Linq; -using JetBrains.Annotations; #nullable enable @@ -32,12 +31,12 @@ public static bool IsIndexerProperty(this PropertyInfo propertyInfo) } public static PropertyInfo? FindGetterProperty(this PropertyInfo propertyInfo) - => propertyInfo.DeclaringType + => propertyInfo.DeclaringType! .GetPropertiesInHierarchy(propertyInfo.GetSimpleMemberName()) .FirstOrDefault(p => p.GetMethod != null); public static PropertyInfo? FindSetterProperty(this PropertyInfo propertyInfo) - => propertyInfo.DeclaringType + => propertyInfo.DeclaringType! .GetPropertiesInHierarchy(propertyInfo.GetSimpleMemberName()) .FirstOrDefault(p => p.SetMethod != null); } diff --git a/src/Shared/ReferenceEqualityComparer.cs b/src/Shared/ReferenceEqualityComparer.cs index 831c5a4c00d..03f37e8d66e 100644 --- a/src/Shared/ReferenceEqualityComparer.cs +++ b/src/Shared/ReferenceEqualityComparer.cs @@ -4,7 +4,6 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; -using JetBrains.Annotations; #nullable enable diff --git a/src/Shared/SharedTypeExtensions.cs b/src/Shared/SharedTypeExtensions.cs index af88e683567..d3bf3df032f 100644 --- a/src/Shared/SharedTypeExtensions.cs +++ b/src/Shared/SharedTypeExtensions.cs @@ -8,7 +8,6 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Text; -using JetBrains.Annotations; #nullable enable @@ -288,8 +287,6 @@ public static Type GetSequenceType(this Type type) return singleImplementation?.GenericTypeArguments.FirstOrDefault(); } -#nullable disable - public static bool IsCompatibleWith(this Type propertyType, Type fieldType) { if (propertyType.IsAssignableFrom(fieldType) @@ -333,74 +330,79 @@ public static IEnumerable GetGenericTypeImplementations(this Type type, Ty public static IEnumerable GetBaseTypes(this Type type) { - type = type.BaseType; + var currentType = type.BaseType; - while (type != null) + while (currentType != null) { - yield return type; + yield return currentType; - type = type.BaseType; + currentType = currentType.BaseType; } } public static IEnumerable GetTypesInHierarchy(this Type type) { - while (type != null) + var currentType = type; + + while (currentType != null) { - yield return type; + yield return currentType; - type = type.BaseType; + currentType = currentType.BaseType; } } - public static ConstructorInfo GetDeclaredConstructor(this Type type, Type[] types) + public static ConstructorInfo GetDeclaredConstructor(this Type type, Type[]? types) { types ??= Array.Empty(); return type.GetTypeInfo().DeclaredConstructors .SingleOrDefault( c => !c.IsStatic - && c.GetParameters().Select(p => p.ParameterType).SequenceEqual(types)); + && c.GetParameters().Select(p => p.ParameterType).SequenceEqual(types))!; } public static IEnumerable GetPropertiesInHierarchy(this Type type, string name) { + var currentType = type; do { - var typeInfo = type.GetTypeInfo(); + var typeInfo = currentType.GetTypeInfo(); foreach (var propertyInfo in typeInfo.DeclaredProperties) { if (propertyInfo.Name.Equals(name, StringComparison.Ordinal) - && !(propertyInfo.GetMethod ?? propertyInfo.SetMethod).IsStatic) + && !(propertyInfo.GetMethod ?? propertyInfo.SetMethod)!.IsStatic) { yield return propertyInfo; } } - type = typeInfo.BaseType; + currentType = typeInfo.BaseType; } - while (type != null); + while (currentType != null); } // Looking up the members through the whole hierarchy allows to find inherited private members. public static IEnumerable GetMembersInHierarchy(this Type type) { + var currentType = type; + do { // Do the whole hierarchy for properties first since looking for fields is slower. - foreach (var propertyInfo in type.GetRuntimeProperties().Where(pi => !(pi.GetMethod ?? pi.SetMethod).IsStatic)) + foreach (var propertyInfo in currentType.GetRuntimeProperties().Where(pi => !(pi.GetMethod ?? pi.SetMethod)!.IsStatic)) { yield return propertyInfo; } - foreach (var fieldInfo in type.GetRuntimeFields().Where(f => !f.IsStatic)) + foreach (var fieldInfo in currentType.GetRuntimeFields().Where(f => !f.IsStatic)) { yield return fieldInfo; } - type = type.BaseType; + currentType = currentType.BaseType; } - while (type != null); + while (currentType != null); } public static IEnumerable GetMembersInHierarchy(this Type type, string name) @@ -427,7 +429,7 @@ public static IEnumerable GetMembersInHierarchy(this Type type, stri #pragma warning restore IDE0034 // Simplify 'default' expression }; - public static object GetDefaultValue(this Type type) + public static object? GetDefaultValue(this Type type) { if (!type.IsValueType) { @@ -455,7 +457,7 @@ public static IEnumerable GetLoadableDefinedTypes(this Assembly assemb } catch (ReflectionTypeLoadException ex) { - return ex.Types.Where(t => t != null).Select(IntrospectionExtensions.GetTypeInfo); + return ex.Types.Where(t => t != null).Select(IntrospectionExtensions.GetTypeInfo!); } } @@ -509,7 +511,7 @@ private static void ProcessArrayType(StringBuilder builder, Type type, bool full var innerType = type; while (innerType.IsArray) { - innerType = innerType.GetElementType(); + innerType = innerType.GetElementType()!; } ProcessType(builder, innerType, fullName); @@ -519,19 +521,19 @@ private static void ProcessArrayType(StringBuilder builder, Type type, bool full builder.Append('['); builder.Append(',', type.GetArrayRank() - 1); builder.Append(']'); - type = type.GetElementType(); + type = type.GetElementType()!; } } private static void ProcessGenericType(StringBuilder builder, Type type, Type[] genericArguments, int length, bool fullName) { - var offset = type.IsNested ? type.DeclaringType.GetGenericArguments().Length : 0; + var offset = type.IsNested ? type.DeclaringType!.GetGenericArguments().Length : 0; if (fullName) { if (type.IsNested) { - ProcessGenericType(builder, type.DeclaringType, genericArguments, offset, fullName); + ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, fullName); builder.Append('+'); } else @@ -576,7 +578,7 @@ public static IEnumerable GetNamespaces(this Type type) yield break; } - yield return type.Namespace; + yield return type.Namespace!; if (type.IsGenericType) { @@ -592,10 +594,10 @@ public static IEnumerable GetNamespaces(this Type type) public static ConstantExpression GetDefaultValueConstant(this Type type) => (ConstantExpression)_generateDefaultValueConstantMethod - .MakeGenericMethod(type).Invoke(null, Array.Empty()); + .MakeGenericMethod(type).Invoke(null, Array.Empty())!; private static readonly MethodInfo _generateDefaultValueConstantMethod = - typeof(SharedTypeExtensions).GetTypeInfo().GetDeclaredMethod(nameof(GenerateDefaultValueConstant)); + typeof(SharedTypeExtensions).GetTypeInfo().GetDeclaredMethod(nameof(GenerateDefaultValueConstant))!; private static ConstantExpression GenerateDefaultValueConstant() => Expression.Constant(default(TDefault), typeof(TDefault));