diff --git a/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs b/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs index a01143a9c6b..8bcd331e8ae 100644 --- a/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs +++ b/src/EFCore.Abstractions/ChangeTracking/Internal/SortableBindingList.cs @@ -69,7 +69,8 @@ protected override void RemoveSortCore() /// 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 override bool IsSortedCore => _isSorted; + protected override bool IsSortedCore + => _isSorted; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -77,7 +78,8 @@ protected override void RemoveSortCore() /// 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 override ListSortDirection SortDirectionCore => _sortDirection; + protected override ListSortDirection SortDirectionCore + => _sortDirection; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -85,7 +87,8 @@ protected override void RemoveSortCore() /// 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 override PropertyDescriptor SortPropertyCore => _sortProperty; + protected override PropertyDescriptor SortPropertyCore + => _sortProperty; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -93,7 +96,8 @@ protected override void RemoveSortCore() /// 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 override bool SupportsSortingCore => true; + protected override bool SupportsSortingCore + => true; private sealed class PropertyComparer : Comparer { diff --git a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs index 8052b5b5287..c4cc47a1c7a 100644 --- a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs +++ b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs @@ -58,7 +58,8 @@ public ObservableCollectionListSource([NotNull] List list) /// /// Always false because there is never a contained collection. /// - bool IListSource.ContainsListCollection => false; + bool IListSource.ContainsListCollection + => false; /// /// Returns an implementation that stays in sync with @@ -68,6 +69,7 @@ public ObservableCollectionListSource([NotNull] List list) /// /// An in sync with the ObservableCollection. /// - IList IListSource.GetList() => _bindingList ?? (_bindingList = this.ToBindingList()); + IList IListSource.GetList() + => _bindingList ?? (_bindingList = this.ToBindingList()); } } diff --git a/src/EFCore.Abstractions/DbFunctionAttribute.cs b/src/EFCore.Abstractions/DbFunctionAttribute.cs index 479e5702ec6..d7cbb56b2b0 100644 --- a/src/EFCore.Abstractions/DbFunctionAttribute.cs +++ b/src/EFCore.Abstractions/DbFunctionAttribute.cs @@ -87,6 +87,7 @@ public virtual bool IsNullable /// /// Checks whether has been explicitly set to a value. /// - public bool IsNullableHasValue => _nullable.HasValue; + public bool IsNullableHasValue + => _nullable.HasValue; } } diff --git a/src/EFCore.Abstractions/IndexAttribute.cs b/src/EFCore.Abstractions/IndexAttribute.cs index 2f005a0100a..7a15fe5e621 100644 --- a/src/EFCore.Abstractions/IndexAttribute.cs +++ b/src/EFCore.Abstractions/IndexAttribute.cs @@ -56,6 +56,7 @@ public bool IsUnique /// /// Checks whether has been explicitly set to a value. /// - public bool IsUniqueHasValue => _isUnique.HasValue; + public bool IsUniqueHasValue + => _isUnique.HasValue; } } diff --git a/src/EFCore.Analyzers/InternalUsageDiagnosticAnalyzer.cs b/src/EFCore.Analyzers/InternalUsageDiagnosticAnalyzer.cs index d63c4e5ca0b..f4009c0fb55 100644 --- a/src/EFCore.Analyzers/InternalUsageDiagnosticAnalyzer.cs +++ b/src/EFCore.Analyzers/InternalUsageDiagnosticAnalyzer.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Operations; - using CSharpSyntax = Microsoft.CodeAnalysis.CSharp.Syntax; using VBSyntax = Microsoft.CodeAnalysis.VisualBasic.Syntax; @@ -37,14 +36,16 @@ private static readonly DiagnosticDescriptor _descriptor defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); - public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(_descriptor); + public override ImmutableArray SupportedDiagnostics + => ImmutableArray.Create(_descriptor); public override void Initialize(AnalysisContext context) { context.EnableConcurrentExecution(); context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); - context.RegisterOperationAction(AnalyzeNode, + context.RegisterOperationAction( + AnalyzeNode, OperationKind.FieldReference, OperationKind.PropertyReference, OperationKind.MethodReference, @@ -54,7 +55,8 @@ public override void Initialize(AnalysisContext context) OperationKind.VariableDeclaration, OperationKind.TypeOf); - context.RegisterSymbolAction(AnalyzeSymbol, + context.RegisterSymbolAction( + AnalyzeSymbol, SymbolKind.NamedType, SymbolKind.Method, SymbolKind.Property, @@ -93,11 +95,11 @@ private static void AnalyzeNode(OperationAnalysisContext context) default: throw new ArgumentException($"Unexpected {nameof(OperationKind)}: {context.Operation.Kind}"); } - } private static void AnalyzeMember(OperationAnalysisContext context, ISymbol symbol) { + // ReSharper disable once RedundantCast if ((object)symbol.ContainingAssembly == context.Compilation.Assembly) { // Skip all methods inside the same assembly - internal access is fine @@ -197,7 +199,7 @@ private static void AnalyzeNamedTypeSymbol(SymbolAnalysisContext context, INamed var location = declaringSyntax.GetSyntax() switch { CSharpSyntax.ClassDeclarationSyntax s when s.BaseList?.Types.Count > 0 - => s.BaseList.Types[0].GetLocation(), + => s.BaseList.Types[0].GetLocation(), { } otherSyntax => otherSyntax.GetLocation() }; @@ -228,6 +230,7 @@ private static void AnalyzeMethodTypeSymbol(SymbolAnalysisContext context, IMeth // Property getters/setters are handled via IPropertySymbol return; } + if (IsInternal(context, symbol.ReturnType)) { foreach (var declaringSyntax in symbol.DeclaringSyntaxReferences) @@ -272,7 +275,8 @@ private static void AnalyzeMemberDeclarationTypeSymbol( } private static void ReportDiagnostic(OperationAnalysisContext context, object messageArg) - => context.ReportDiagnostic(Diagnostic.Create(_descriptor, NarrowDownSyntax(context.Operation.Syntax).GetLocation(), messageArg)); + => context.ReportDiagnostic( + Diagnostic.Create(_descriptor, NarrowDownSyntax(context.Operation.Syntax).GetLocation(), messageArg)); private static void ReportDiagnostic(SymbolAnalysisContext context, SyntaxNode syntax, object messageArg) => context.ReportDiagnostic(Diagnostic.Create(_descriptor, NarrowDownSyntax(syntax).GetLocation(), messageArg)); @@ -285,20 +289,20 @@ private static SyntaxNode NarrowDownSyntax(SyntaxNode syntax) => syntax switch { CSharpSyntax.InvocationExpressionSyntax s - when s.Expression is CSharpSyntax.MemberAccessExpressionSyntax memberAccessSyntax - => memberAccessSyntax.Name, + when s.Expression is CSharpSyntax.MemberAccessExpressionSyntax memberAccessSyntax + => memberAccessSyntax.Name, CSharpSyntax.MemberAccessExpressionSyntax s => s.Name, CSharpSyntax.ObjectCreationExpressionSyntax s => s.Type, CSharpSyntax.PropertyDeclarationSyntax s => s.Type, CSharpSyntax.VariableDeclaratorSyntax declarator - => declarator.Parent is CSharpSyntax.VariableDeclarationSyntax declaration - ? declaration.Type - : (SyntaxNode)declarator, + => declarator.Parent is CSharpSyntax.VariableDeclarationSyntax declaration + ? declaration.Type + : (SyntaxNode)declarator, CSharpSyntax.TypeOfExpressionSyntax s => s.Type, VBSyntax.InvocationExpressionSyntax s - when s.Expression is VBSyntax.MemberAccessExpressionSyntax memberAccessSyntax - => memberAccessSyntax.Name, + when s.Expression is VBSyntax.MemberAccessExpressionSyntax memberAccessSyntax + => memberAccessSyntax.Name, VBSyntax.MemberAccessExpressionSyntax s => s.Name, VBSyntax.ObjectCreationExpressionSyntax s => s.Type, VBSyntax.TypeOfExpressionSyntax s => s.Type, @@ -307,17 +311,21 @@ when s.Expression is VBSyntax.MemberAccessExpressionSyntax memberAccessSyntax }; private static bool IsInternal(SymbolAnalysisContext context, ITypeSymbol symbol) + // ReSharper disable once RedundantCast => (object)symbol.ContainingAssembly != context.Compilation.Assembly && (IsInInternalNamespace(symbol) || HasInternalAttribute(symbol)); private static bool IsInternal(OperationAnalysisContext context, ITypeSymbol symbol) + // ReSharper disable once RedundantCast => (object)symbol.ContainingAssembly != context.Compilation.Assembly && (IsInInternalNamespace(symbol) || HasInternalAttribute(symbol)); private static bool HasInternalAttribute(ISymbol symbol) => symbol != null - && symbol.GetAttributes().Any(a => - a.AttributeClass.ToDisplayString() == "Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternalAttribute"); + && symbol.GetAttributes().Any( + a => + a.AttributeClass.ToDisplayString() + == "Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternalAttribute"); private static bool IsInInternalNamespace(ISymbol symbol) { @@ -326,10 +334,11 @@ private static bool IsInInternalNamespace(ISymbol symbol) var i = ns.IndexOf("EntityFrameworkCore"); return - i != -1 && - (i == 0 || ns[i - 1] == '.') && - i + EFLen < ns.Length && ns[i + EFLen] == '.' && - ns.EndsWith(".Internal", StringComparison.Ordinal); + i != -1 + && (i == 0 || ns[i - 1] == '.') + && i + EFLen < ns.Length + && ns[i + EFLen] == '.' + && ns.EndsWith(".Internal", StringComparison.Ordinal); } return false; diff --git a/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs index fd0b049c29d..c4fd0e1c24f 100644 --- a/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs @@ -69,8 +69,8 @@ public virtual void Intercept(IInvocation invocation) ?? (INavigationBase)_entityType.FindSkipNavigation(navigationName); if (navigationBase != null - && (!(navigationBase is INavigation navigation - && navigation.ForeignKey.IsOwnership))) + && (!(navigationBase is INavigation navigation + && navigation.ForeignKey.IsOwnership))) { _loader.Load(invocation.Proxy, navigationName); } diff --git a/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs index 43289294394..511ec1a39ab 100644 --- a/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs @@ -71,8 +71,8 @@ public virtual void Intercept(IInvocation invocation) { var comparer = property.IsKey() || property.IsForeignKey() - ? property.GetKeyValueComparer() - : property.GetValueComparer(); + ? property.GetKeyValueComparer() + : property.GetValueComparer(); HandleChanged(invocation, property, comparer); } diff --git a/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs index fcf394b088d..71c510924e3 100644 --- a/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs @@ -71,8 +71,8 @@ public virtual void Intercept(IInvocation invocation) { var comparer = property.IsKey() || property.IsForeignKey() - ? property.GetKeyValueComparer() - : property.GetValueComparer(); + ? property.GetKeyValueComparer() + : property.GetValueComparer(); HandleChanging(invocation, property, comparer); } diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs b/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs index 3cdc9f6e81f..51c0f274103 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs @@ -65,7 +65,8 @@ public virtual ConventionSet ModifyConventions(ConventionSet conventionSet) new ProxyChangeTrackingConvention(extension), typeof(DbSetFindingConvention)); - conventionSet.ModelFinalizingConventions.Add(new ProxyBindingRewriter( + conventionSet.ModelFinalizingConventions.Add( + new ProxyBindingRewriter( _proxyFactory, extension, _lazyLoaderParameterBindingFactoryDependencies, diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxiesOptionsExtension.cs b/src/EFCore.Proxies/Proxies/Internal/ProxiesOptionsExtension.cs index 5bb950fc40d..a3a86a54599 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxiesOptionsExtension.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxiesOptionsExtension.cs @@ -64,7 +64,8 @@ public virtual DbContextOptionsExtensionInfo Info /// 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 ProxiesOptionsExtension Clone() => new ProxiesOptionsExtension(this); + protected virtual ProxiesOptionsExtension Clone() + => new ProxiesOptionsExtension(this); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -72,7 +73,8 @@ public virtual DbContextOptionsExtensionInfo Info /// 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. /// - public virtual bool UseLazyLoadingProxies => _useLazyLoadingProxies; + public virtual bool UseLazyLoadingProxies + => _useLazyLoadingProxies; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -80,7 +82,8 @@ public virtual DbContextOptionsExtensionInfo Info /// 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. /// - public virtual bool UseChangeTrackingProxies => _useChangeTrackingProxies; + public virtual bool UseChangeTrackingProxies + => _useChangeTrackingProxies; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -88,7 +91,8 @@ public virtual DbContextOptionsExtensionInfo Info /// 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. /// - public virtual bool CheckEquality => _checkEquality; + public virtual bool CheckEquality + => _checkEquality; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -96,7 +100,8 @@ public virtual DbContextOptionsExtensionInfo Info /// 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. /// - public virtual bool UseProxies => UseLazyLoadingProxies || UseChangeTrackingProxies; + public virtual bool UseProxies + => UseLazyLoadingProxies || UseChangeTrackingProxies; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -173,18 +178,20 @@ public ExtensionInfo(IDbContextOptionsExtension extension) private new ProxiesOptionsExtension Extension => (ProxiesOptionsExtension)base.Extension; - public override bool IsDatabaseProvider => false; + public override bool IsDatabaseProvider + => false; public override string LogFragment => _logFragment ??= Extension.UseLazyLoadingProxies && Extension.UseChangeTrackingProxies ? "using lazy-loading and change tracking proxies " : Extension.UseLazyLoadingProxies - ? "using lazy-loading proxies " - : Extension.UseChangeTrackingProxies - ? "using change tracking proxies " - : ""; + ? "using lazy-loading proxies " + : Extension.UseChangeTrackingProxies + ? "using change tracking proxies " + : ""; - public override long GetServiceProviderHashCode() => Extension.UseProxies ? 541 : 0; + public override long GetServiceProviderHashCode() + => Extension.UseProxies ? 541 : 0; public override void PopulateDebugInfo(IDictionary debugInfo) { diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxyBindingRewriter.cs b/src/EFCore.Proxies/Proxies/Internal/ProxyBindingRewriter.cs index 9d36424d02f..6f107c4a8b4 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxyBindingRewriter.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxyBindingRewriter.cs @@ -58,7 +58,8 @@ public ProxyBindingRewriter( /// public virtual void ProcessModelFinalizing( - IConventionModelBuilder modelBuilder, IConventionContext context) + IConventionModelBuilder modelBuilder, + IConventionContext context) { if (_options?.UseProxies == true) { diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs b/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs index 37d91b91988..beece7e93eb 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxyChangeTrackingConvention.cs @@ -25,7 +25,7 @@ public class ProxyChangeTrackingConvention : IModelInitializedConvention /// doing so can result in application failures when updating to a new Entity Framework Core release. /// public ProxyChangeTrackingConvention( - [CanBeNull] ProxiesOptionsExtension options) + [CanBeNull] ProxiesOptionsExtension options) { _options = options; } @@ -35,7 +35,9 @@ public ProxyChangeTrackingConvention( /// /// The builder for the model. /// Additional information associated with convention execution. - public virtual void ProcessModelInitialized(IConventionModelBuilder modelBuilder, IConventionContext context) + public virtual void ProcessModelInitialized( + IConventionModelBuilder modelBuilder, + IConventionContext context) { if (_options?.UseChangeTrackingProxies == true) { diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxyFactory.cs b/src/EFCore.Proxies/Proxies/Internal/ProxyFactory.cs index 9060134a9b3..00b9a6954d8 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxyFactory.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxyFactory.cs @@ -9,6 +9,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; +using IInterceptor = Castle.DynamicProxy.IInterceptor; namespace Microsoft.EntityFrameworkCore.Proxies.Internal { @@ -184,12 +185,12 @@ private Type[] GetInterfacesToProxy( return interfacesToProxy.ToArray(); } - private Castle.DynamicProxy.IInterceptor[] GetNotifyChangeInterceptors( + private IInterceptor[] GetNotifyChangeInterceptors( ProxiesOptionsExtension options, IEntityType entityType, LazyLoadingInterceptor lazyLoadingInterceptor = null) { - var interceptors = new List(); + var interceptors = new List(); if (lazyLoadingInterceptor != null) { diff --git a/src/EFCore.Proxies/ProxiesExtensions.cs b/src/EFCore.Proxies/ProxiesExtensions.cs index 5129b578ffc..1974406be28 100644 --- a/src/EFCore.Proxies/ProxiesExtensions.cs +++ b/src/EFCore.Proxies/ProxiesExtensions.cs @@ -31,8 +31,14 @@ public static class ProxiesExtensions /// The options builder, as passed to /// or exposed AddDbContext. /// - /// to use change tracking proxies; to prevent their use. - /// if proxy change detection should check if the incoming value is equal to the current value before notifying. Defaults to . + /// + /// to use change tracking proxies; to prevent their + /// use. + /// + /// + /// if proxy change detection should check if the incoming value is equal to the current + /// value before notifying. Defaults to . + /// /// The same builder to allow method calls to be chained. public static DbContextOptionsBuilder UseChangeTrackingProxies( [NotNull] this DbContextOptionsBuilder optionsBuilder, @@ -66,15 +72,22 @@ public static DbContextOptionsBuilder UseChangeTrackingProxies( /// The options builder, as passed to /// or exposed AddDbContext. /// - /// to use change tracking proxies; to prevent their use. - /// if proxy change detection should check if the incoming value is equal to the current value before notifying. Defaults to . + /// + /// to use change tracking proxies; to prevent their + /// use. + /// + /// + /// if proxy change detection should check if the incoming value is equal to the current + /// value before notifying. Defaults to . + /// /// The same builder to allow method calls to be chained. public static DbContextOptionsBuilder UseChangeTrackingProxies( [NotNull] this DbContextOptionsBuilder optionsBuilder, bool useChangeTrackingProxies = true, bool checkEquality = true) where TContext : DbContext - => (DbContextOptionsBuilder)UseChangeTrackingProxies((DbContextOptionsBuilder)optionsBuilder, useChangeTrackingProxies, checkEquality); + => (DbContextOptionsBuilder)UseChangeTrackingProxies( + (DbContextOptionsBuilder)optionsBuilder, useChangeTrackingProxies, checkEquality); /// /// @@ -90,7 +103,7 @@ public static DbContextOptionsBuilder UseChangeTrackingProxies /// or exposed AddDbContext. /// - /// to use lazy-loading proxies; to prevent their use. + /// to use lazy-loading proxies; to prevent their use. /// The same builder to allow method calls to be chained. public static DbContextOptionsBuilder UseLazyLoadingProxies( [NotNull] this DbContextOptionsBuilder optionsBuilder, @@ -123,7 +136,7 @@ public static DbContextOptionsBuilder UseLazyLoadingProxies( /// The options builder, as passed to /// or exposed AddDbContext. /// - /// to use lazy-loading proxies; to prevent their use. + /// to use lazy-loading proxies; to prevent their use. /// The same builder to allow method calls to be chained. public static DbContextOptionsBuilder UseLazyLoadingProxies( [NotNull] this DbContextOptionsBuilder optionsBuilder, diff --git a/src/Shared/Check.cs b/src/Shared/Check.cs index 0a3ab5dc2da..d06aa69dfdb 100644 --- a/src/Shared/Check.cs +++ b/src/Shared/Check.cs @@ -112,7 +112,7 @@ public static IReadOnlyList HasNoEmptyElements( } [Conditional("DEBUG")] - public static void DebugAssert([CA.DoesNotReturnIf(false)] bool condition, string message) + public static void DebugAssert([CA.DoesNotReturnIfAttribute(false)] bool condition, string message) { if (!condition) {