From 11d7a6c4c00e68ea1eb6e30382ea55315919094b Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Tue, 19 Dec 2023 18:28:33 -0800 Subject: [PATCH] Fix T4 files for VS 17.8 --- .../AbstractionsStrings.Designer.tt | 1 + .../Properties/CosmosStrings.Designer.tt | 1 + .../Properties/DesignStrings.Designer.tt | 1 + .../Properties/DesignStrings.resx | 54 +++++++-------- .../Properties/InMemoryStrings.Designer.tt | 1 + .../Properties/ProxiesStrings.Designer.tt | 1 + .../Properties/RelationalStrings.Designer.cs | 2 +- .../Properties/RelationalStrings.Designer.tt | 1 + .../Properties/RelationalStrings.resx | 54 +++++++-------- .../SqlServerHierarchyIdStrings.Designer.tt | 1 + .../SqlServerNTSStrings.Designer.tt | 1 + .../Properties/SqlServerStrings.Designer.cs | 12 ++-- .../Properties/SqlServerStrings.Designer.tt | 1 + .../Properties/SqlServerStrings.resx | 66 +++++++++---------- .../Properties/SqliteStrings.Designer.cs | 16 ++--- .../Properties/SqliteStrings.Designer.tt | 1 + .../Properties/SqliteStrings.resx | 6 +- .../Properties/SqliteNTSStrings.Designer.tt | 1 + src/EFCore/Diagnostics/LoggingDefinitions.cs | 4 +- src/EFCore/Properties/CoreStrings.Designer.cs | 19 ++---- src/EFCore/Properties/CoreStrings.Designer.tt | 1 + src/EFCore/Properties/CoreStrings.resx | 54 +++++++-------- .../Properties/Resources.Designer.tt | 1 + tools/Resources.tt | 8 +-- 24 files changed, 157 insertions(+), 151 deletions(-) diff --git a/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.tt b/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.tt index 7f949528ecf..badceae18c3 100644 --- a/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.tt +++ b/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "AbstractionsStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Properties"; Session["NoDiagnostics"] = true; diff --git a/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.tt b/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.tt index 2e76a245ada..3d0b6b41405 100644 --- a/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.tt +++ b/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "CosmosStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Cosmos.Properties"; Session["LoggingDefinitionsClass"] = "Diagnostics.Internal.CosmosLoggingDefinitions"; diff --git a/src/EFCore.Design/Properties/DesignStrings.Designer.tt b/src/EFCore.Design/Properties/DesignStrings.Designer.tt index 59a1a0e4306..1ed4c32fe98 100644 --- a/src/EFCore.Design/Properties/DesignStrings.Designer.tt +++ b/src/EFCore.Design/Properties/DesignStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "DesignStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Properties"; Session["LoggingDefinitionsClass"] = "DesignLoggingDefinitions"; diff --git a/src/EFCore.Design/Properties/DesignStrings.resx b/src/EFCore.Design/Properties/DesignStrings.resx index c7f615b2a7d..9f4d9a96da1 100644 --- a/src/EFCore.Design/Properties/DesignStrings.resx +++ b/src/EFCore.Design/Properties/DesignStrings.resx @@ -1,17 +1,17 @@  - diff --git a/src/EFCore.InMemory/Properties/InMemoryStrings.Designer.tt b/src/EFCore.InMemory/Properties/InMemoryStrings.Designer.tt index daab85b9aed..8f9f997c866 100644 --- a/src/EFCore.InMemory/Properties/InMemoryStrings.Designer.tt +++ b/src/EFCore.InMemory/Properties/InMemoryStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "InMemoryStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.InMemory.Properties"; Session["LoggingDefinitionsClass"] = "Diagnostics.Internal.InMemoryLoggingDefinitions"; diff --git a/src/EFCore.Proxies/Properties/ProxiesStrings.Designer.tt b/src/EFCore.Proxies/Properties/ProxiesStrings.Designer.tt index 336ef8ec8b1..f6838252b8a 100644 --- a/src/EFCore.Proxies/Properties/ProxiesStrings.Designer.tt +++ b/src/EFCore.Proxies/Properties/ProxiesStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "ProxiesStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Properties"; Session["LoggingDefinitionsClass"] = "ProxiesLoggingDefinitions"; diff --git a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs index dee56b4839e..b51e97b7cb3 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs +++ b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs @@ -2054,7 +2054,7 @@ public static string UnsupportedOperatorForSqlExpression(object? nodeType, objec nodeType, expressionType); /// - /// No relational type mapping can be found for property '{entity}.{property}' and the current provider doesn't specify a default store type for the properties of type '{clrType}'. + /// No relational type mapping can be found for property '{entity}.{property}' and the current provider doesn't specify a default store type for the properties of type '{clrType}'. /// public static string UnsupportedPropertyType(object? entity, object? property, object? clrType) => string.Format( diff --git a/src/EFCore.Relational/Properties/RelationalStrings.Designer.tt b/src/EFCore.Relational/Properties/RelationalStrings.Designer.tt index 4cfbd0d7ab2..02cf0c52c62 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.Designer.tt +++ b/src/EFCore.Relational/Properties/RelationalStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "RelationalStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Properties"; Session["LoggingDefinitionsClass"] = "RelationalLoggingDefinitions"; diff --git a/src/EFCore.Relational/Properties/RelationalStrings.resx b/src/EFCore.Relational/Properties/RelationalStrings.resx index 2ea8a3f06da..c8ad865e420 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.resx +++ b/src/EFCore.Relational/Properties/RelationalStrings.resx @@ -1,17 +1,17 @@  - diff --git a/src/EFCore.SqlServer.HierarchyId/Properties/SqlServerHierarchyIdStrings.Designer.tt b/src/EFCore.SqlServer.HierarchyId/Properties/SqlServerHierarchyIdStrings.Designer.tt index 3946db3154a..c5c536e3617 100644 --- a/src/EFCore.SqlServer.HierarchyId/Properties/SqlServerHierarchyIdStrings.Designer.tt +++ b/src/EFCore.SqlServer.HierarchyId/Properties/SqlServerHierarchyIdStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "SqlServerHierarchyIdStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.SqlServer.Properties"; Session["LoggingDefinitionsClass"] = "SqlServerHierarchyIdLoggingDefinitions"; diff --git a/src/EFCore.SqlServer.NTS/Properties/SqlServerNTSStrings.Designer.tt b/src/EFCore.SqlServer.NTS/Properties/SqlServerNTSStrings.Designer.tt index df20553ca19..0bd81b8555b 100644 --- a/src/EFCore.SqlServer.NTS/Properties/SqlServerNTSStrings.Designer.tt +++ b/src/EFCore.SqlServer.NTS/Properties/SqlServerNTSStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "SqlServerNTSStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.SqlServer.Properties"; Session["LoggingDefinitionsClass"] = "SqlServerNtsLoggingDefinitions"; diff --git a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs index 7981b459724..44bf55728a3 100644 --- a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs +++ b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs @@ -147,12 +147,6 @@ public static string DuplicateKeyMismatchedClustering(object? key1, object? enti GetString("DuplicateKeyMismatchedClustering", nameof(key1), nameof(entityType1), nameof(key2), nameof(entityType2), nameof(table), nameof(keyName)), key1, entityType1, key2, entityType2, table, keyName); - /// - /// This usage of Math.Min or Math.Max requires SQL Server functions LEAST and GREATEST, which require compatibility level 160. - /// - public static string LeastGreatestCompatibilityLevelTooLow - => GetString("LeastGreatestCompatibilityLevelTooLow"); - /// /// Identity value generation cannot be used for the property '{property}' on entity type '{entityType}' because the property type is '{propertyType}'. Identity value generation can only be used with signed integer properties. /// @@ -229,6 +223,12 @@ public static string JsonValuePathExpressionsNotSupported(object? compatibilityL GetString("JsonValuePathExpressionsNotSupported", nameof(compatibilityLevel)), compatibilityLevel); + /// + /// This usage of Math.Min or Math.Max requires SQL Server functions LEAST and GREATEST, which require compatibility level 160. + /// + public static string LeastGreatestCompatibilityLevelTooLow + => GetString("LeastGreatestCompatibilityLevelTooLow"); + /// /// The properties {properties} are configured to use 'Identity' value generation and are mapped to the same table '{table}', but only one column per table can be configured as 'Identity'. Call 'ValueGeneratedNever' in 'OnModelCreating' for properties that should not use 'Identity'. /// diff --git a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.tt b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.tt index e6284925f33..3302eebc580 100644 --- a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.tt +++ b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "SqlServerStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.SqlServer.Properties"; Session["LoggingDefinitionsClass"] = "Diagnostics.Internal.SqlServerLoggingDefinitions"; diff --git a/src/EFCore.SqlServer/Properties/SqlServerStrings.resx b/src/EFCore.SqlServer/Properties/SqlServerStrings.resx index 68670a2790e..ba817be851a 100644 --- a/src/EFCore.SqlServer/Properties/SqlServerStrings.resx +++ b/src/EFCore.SqlServer/Properties/SqlServerStrings.resx @@ -1,17 +1,17 @@  - @@ -147,6 +147,9 @@ The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different clustered configurations. + + The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different data compression configurations. + The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different fill factor configurations. @@ -159,15 +162,9 @@ The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different sort in tempdb configurations. - - The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different data compression configurations. - The keys {key1} on '{entityType1}' and {key2} on '{entityType2}' are both mapped to '{table}.{keyName}', but have different clustering configurations. - - This usage of Math.Min or Math.Max requires SQL Server functions LEAST and GREATEST, which require compatibility level 160. - Identity value generation cannot be used for the property '{property}' on entity type '{entityType}' because the property type is '{propertyType}'. Identity value generation can only be used with signed integer properties. @@ -198,6 +195,9 @@ A non-constant array index or property name was used when navigating inside a JSON document, but EF Core's SQL Server compatibility level is set to {compatibilityLevel}; this is only supported with compatibility level 140 (SQL Server 2017) or higher. + + This usage of Math.Min or Math.Max requires SQL Server functions LEAST and GREATEST, which require compatibility level 160. + The property '{property}' on entity type '{entityType}' is of type 'byte', but is set up to use a SQL Server identity column; this requires that values starting at 255 and counting down will be used for temporary key values. A temporary key value is needed for every entity inserted in a single call to 'SaveChanges'. Care must be taken that these values do not collide with real key values. Warning SqlServerEventId.ByteIdentityColumnWarning string string diff --git a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs index 16b89ac2248..ad9b744b236 100644 --- a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs +++ b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs @@ -67,14 +67,6 @@ public static string InvalidMigrationOperation(object? operation) GetString("InvalidMigrationOperation", nameof(operation)), operation); - /// - /// SQLite version {sqliteVersion} is being used, but version 3.38.0 or higher is required for querying into JSON collections. - /// - public static string QueryingIntoJsonCollectionsNotSupported(object? sqliteVersion) - => string.Format( - GetString("QueryingIntoJsonCollectionsNotSupported", nameof(sqliteVersion)), - sqliteVersion); - /// /// Generating idempotent scripts for migrations is not currently supported for SQLite. See https://go.microsoft.com/fwlink/?LinkId=723262 for more information and examples. /// @@ -89,6 +81,14 @@ public static string OrderByNotSupported(object? type) GetString("OrderByNotSupported", nameof(type)), type); + /// + /// SQLite version {sqliteVersion} is being used, but version 3.38.0 or higher is required for querying into JSON collections. + /// + public static string QueryingIntoJsonCollectionsNotSupported(object? sqliteVersion) + => string.Format( + GetString("QueryingIntoJsonCollectionsNotSupported", nameof(sqliteVersion)), + sqliteVersion); + /// /// SQLite does not support sequences. See https://go.microsoft.com/fwlink/?LinkId=723262 for more information and examples. /// diff --git a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.tt b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.tt index 463f962582b..f62faff4f76 100644 --- a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.tt +++ b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "SqliteStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Sqlite.Properties"; Session["LoggingDefinitionsClass"] = "Diagnostics.Internal.SqliteLoggingDefinitions"; diff --git a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx index f34ef8c7022..a55f6d737db 100644 --- a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx +++ b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx @@ -135,9 +135,6 @@ SQLite does not support this migration operation ('{operation}'). See https://go.microsoft.com/fwlink/?LinkId=723262 for more information and examples. - - SQLite version {sqliteVersion} is being used, but version 3.38.0 or higher is required for querying into JSON collections. - The entity type '{entityType}' has composite key '{key}' which is configured to use generated values. SQLite does not support generated values on composite keys. Warning SqliteEventId.CompositeKeyWithValueGeneration string? string? @@ -216,6 +213,9 @@ SQLite does not support expressions of type '{type}' in ORDER BY clauses. Convert the values to a supported type, or use LINQ to Objects to order the results on the client side. + + SQLite version {sqliteVersion} is being used, but version 3.38.0 or higher is required for querying into JSON collections. + SQLite does not support sequences. See https://go.microsoft.com/fwlink/?LinkId=723262 for more information and examples. diff --git a/src/EFCore.Sqlite.NTS/Properties/SqliteNTSStrings.Designer.tt b/src/EFCore.Sqlite.NTS/Properties/SqliteNTSStrings.Designer.tt index 2ce331a467b..695a249f8a0 100644 --- a/src/EFCore.Sqlite.NTS/Properties/SqliteNTSStrings.Designer.tt +++ b/src/EFCore.Sqlite.NTS/Properties/SqliteNTSStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "SqliteNTSStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Sqlite.Properties"; Session["LoggingDefinitionsClass"] = "SqliteNtsLoggingDefinitions"; diff --git a/src/EFCore/Diagnostics/LoggingDefinitions.cs b/src/EFCore/Diagnostics/LoggingDefinitions.cs index 519d9ae272a..0082443fd2c 100644 --- a/src/EFCore/Diagnostics/LoggingDefinitions.cs +++ b/src/EFCore/Diagnostics/LoggingDefinitions.cs @@ -374,7 +374,7 @@ public abstract class LoggingDefinitions /// doing so can result in application failures when updating to a new Entity Framework Core release. /// [EntityFrameworkInternal] - public EventDefinitionBase? SkippedEntityTypeConfigurationWarning; + public EventDefinitionBase? LogSkippedEntityTypeConfigurationWarning; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -383,7 +383,7 @@ public abstract class LoggingDefinitions /// doing so can result in application failures when updating to a new Entity Framework Core release. /// [EntityFrameworkInternal] - public EventDefinitionBase? NoEntityTypeConfigurationsWarning; + public EventDefinitionBase? LogNoEntityTypeConfigurationsWarning; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/src/EFCore/Properties/CoreStrings.Designer.cs b/src/EFCore/Properties/CoreStrings.Designer.cs index 34aaead7213..4c3e1b90b27 100644 --- a/src/EFCore/Properties/CoreStrings.Designer.cs +++ b/src/EFCore/Properties/CoreStrings.Designer.cs @@ -5,7 +5,6 @@ using System.Resources; using System.Threading; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.Extensions.Logging; @@ -627,8 +626,8 @@ public static string ConflictingPropertyOrNavigation(object? member, object? typ /// The property '{entityType}.{property}' participates in several relationship chains that have conflicting conversions: '{valueConversion}' and '{conflictingValueConversion}'. /// public static string ConflictingRelationshipConversions(object? entityType, object? property, object? valueConversion, object? conflictingValueConversion) - => string.Format( - GetString("ConflictingRelationshipConversions", nameof(entityType), nameof(property), nameof(valueConversion), nameof(conflictingValueConversion)), + => string.Format( + GetString("ConflictingRelationshipConversions", nameof(entityType), nameof(property), nameof(valueConversion), nameof(conflictingValueConversion)), entityType, property, valueConversion, conflictingValueConversion); /// @@ -991,12 +990,6 @@ public static string EFConstantWithNonEvaluableArgument public static string EFParameterInvoked => GetString("EFParameterInvoked"); - /// - /// The EF.Parameter<T> method may only be used with an argument that can be evaluated client-side and does not contain any reference to database-side entities. - /// - public static string EFParameterWithNonEvaluableArgument - => GetString("EFParameterWithNonEvaluableArgument"); - /// /// Complex type '{complexType}' has no properties defines. Configure at least one property or don't include this type in the model. /// @@ -4205,11 +4198,11 @@ public static EventDefinition LogNavigationLazyLoading(IDiagnost /// public static EventDefinition LogNoEntityTypeConfigurationsWarning(IDiagnosticsLogger logger) { - var definition = ((LoggingDefinitions)logger.Definitions).NoEntityTypeConfigurationsWarning; + var definition = ((LoggingDefinitions)logger.Definitions).LogNoEntityTypeConfigurationsWarning; if (definition == null) { definition = NonCapturingLazyInitializer.EnsureInitialized( - ref ((LoggingDefinitions)logger.Definitions).NoEntityTypeConfigurationsWarning, + ref ((LoggingDefinitions)logger.Definitions).LogNoEntityTypeConfigurationsWarning, logger, static logger => new EventDefinition( logger.Options, @@ -4955,11 +4948,11 @@ public static EventDefinition LogSkipCollectio /// public static EventDefinition LogSkippedEntityTypeConfigurationWarning(IDiagnosticsLogger logger) { - var definition = ((LoggingDefinitions)logger.Definitions).SkippedEntityTypeConfigurationWarning; + var definition = ((LoggingDefinitions)logger.Definitions).LogSkippedEntityTypeConfigurationWarning; if (definition == null) { definition = NonCapturingLazyInitializer.EnsureInitialized( - ref ((LoggingDefinitions)logger.Definitions).SkippedEntityTypeConfigurationWarning, + ref ((LoggingDefinitions)logger.Definitions).LogSkippedEntityTypeConfigurationWarning, logger, static logger => new EventDefinition( logger.Options, diff --git a/src/EFCore/Properties/CoreStrings.Designer.tt b/src/EFCore/Properties/CoreStrings.Designer.tt index d81f45f7933..dddf7f10422 100644 --- a/src/EFCore/Properties/CoreStrings.Designer.tt +++ b/src/EFCore/Properties/CoreStrings.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "CoreStrings.resx"; Session["ResourceNamespace"] = "Microsoft.EntityFrameworkCore.Properties"; Session["LoggingDefinitionsClass"] = "LoggingDefinitions"; diff --git a/src/EFCore/Properties/CoreStrings.resx b/src/EFCore/Properties/CoreStrings.resx index a3a2fa56a9a..c2a088acf13 100644 --- a/src/EFCore/Properties/CoreStrings.resx +++ b/src/EFCore/Properties/CoreStrings.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.Data.Sqlite.Core/Properties/Resources.Designer.tt b/src/Microsoft.Data.Sqlite.Core/Properties/Resources.Designer.tt index dae483e64d8..66a69f7cee4 100644 --- a/src/Microsoft.Data.Sqlite.Core/Properties/Resources.Designer.tt +++ b/src/Microsoft.Data.Sqlite.Core/Properties/Resources.Designer.tt @@ -1,4 +1,5 @@ <# + Session = new System.Collections.Generic.Dictionary(); Session["ResourceFile"] = "Resources.resx"; Session["ResourceNamespace"] = "Microsoft.Data.Sqlite.Properties"; Session["NoDiagnostics"] = true; diff --git a/tools/Resources.tt b/tools/Resources.tt index d555a698ed8..c8442fe70a4 100644 --- a/tools/Resources.tt +++ b/tools/Resources.tt @@ -10,9 +10,9 @@ <#@ import namespace="System.Resources" #> <#@ import namespace="System.Text.RegularExpressions" #> <#@ import namespace="EnvDTE" #> -<#@ parameter name="NamespaceHint" type="System.String" #> <# var model = LoadResources(); + var namespaceHint = (string)System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("NamespaceHint"); #> // @@ -33,10 +33,10 @@ using Microsoft.Extensions.Logging; #nullable enable -namespace <#= NamespaceHint #> +namespace <#= namespaceHint #> { <# - if (NamespaceHint.EndsWith("Internal", StringComparison.Ordinal) + if (namespaceHint.EndsWith("Internal", StringComparison.Ordinal) || model.AccessModifier == "internal") { #> @@ -129,7 +129,7 @@ namespace <#= NamespaceHint #> if (!model.NoDiagnostics) { #> -namespace <#= NamespaceHint.EndsWith(".Internal", StringComparison.Ordinal) ? NamespaceHint : (NamespaceHint + ".Internal") #> +namespace <#= namespaceHint.EndsWith(".Internal", StringComparison.Ordinal) ? namespaceHint : namespaceHint + ".Internal" #> { /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to