Skip to content

Commit

Permalink
Temp StringsHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
jJRahnama committed Jul 9, 2021
1 parent bb85036 commit 42850a9
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 66 deletions.
1 change: 0 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<ToolsArtifactsDir Condition="'$(ToolsArtifactsDir)'==''">$(Artifacts)tools\</ToolsArtifactsDir>
<ManagedSourceCode>$(ProjectDir)Microsoft.Data.SqlClient\</ManagedSourceCode>
<NetCoreSource>$(ManagedSourceCode)netcore\</NetCoreSource>
<NetCoreResources>$(ManagedSourceCode)netcore\src\Resources\</NetCoreResources>
<NetFxSource>$(ManagedSourceCode)netfx\</NetFxSource>
<NetFxResources>$(ManagedSourceCode)netfx\src\Resources\</NetFxResources>
<AddOnsPath>$(ManagedSourceCode)add-ons\</AddOnsPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlUtil.cs">
<Link>Microsoft\Data\SqlClient\SqlUtil.cs</Link>
</Compile>
<Compile Include="..\..\src\Resources\ResCategoryAttribute.cs">
<Compile Include="..\..\src\Resources\ResCategoryAttribute.cs">
<Link>Resources\ResCategoryAttribute.cs</Link>
</Compile>
<Compile Include="..\..\src\Resources\ResDescriptionAttribute.cs">
Expand Down Expand Up @@ -831,6 +831,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Microsoft\Data\SqlClient\AAsyncCallContext.cs" />
<Compile Include="Resources\StringHelper.cs" />
<Compile Include="Resources\Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -878,5 +879,4 @@
<Import Project="$(ToolsDir)targets\GenerateThisAssemblyCs.targets" />
<Import Project="$(ToolsDir)targets\ResolveContract.targets" Condition="'$(OSGroup)' == 'AnyOS'" />
<Import Project="$(ToolsDir)targets\NotSupported.targets" Condition="'$(OSGroup)' == 'AnyOS'" />
<Import Project="$(NetCoreSource)tools\targets\GenerateResourceStringsSource.targets" />
</Project>
62 changes: 62 additions & 0 deletions src/Microsoft.Data.SqlClient/netcore/src/Resources/StringHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.


// This class is added to provide ResCategory and ResDescription constants temporarily
// In netfx the powershell script GenerateResourceStringsSource is generating them on build time, but there were some problem with
// Unix builds running the scripts.
// We can investigate MetadataTypeAttribute to be add the annotations to SqlClientConnectionStringBuilder.Windows and omit them in non-windows classes
namespace System
{
internal partial class StringsHelper
{
internal class ResourceNames
{
internal const string DataCategory_Advanced = @"Advanced";
internal const string DataCategory_ConnectionResilency = @"Connection Resiliency";
internal const string DataCategory_Context = @"Context";
internal const string DataCategory_Initialization = @"Initialization";
internal const string DataCategory_Pooling = @"Pooling";
internal const string DataCategory_Replication = @"Replication";
internal const string DataCategory_Security = @"Security";
internal const string DataCategory_Source = @"Source";
internal const string DbCommand_CommandTimeout = @"Time to wait for command to execute.";
internal const string DbConnectionString_ApplicationIntent = @"Declares the application workload type when connecting to a server.";
internal const string DbConnectionString_ApplicationName = @"The name of the application.";
internal const string DbConnectionString_AttachDBFilename = @"The name of the primary file, including the full path name, of an attachable database.";
internal const string DbConnectionString_Authentication = @"Specifies the method of authenticating with SQL Server.";
internal const string DbConnectionString_ConnectRetryCount = @"Number of attempts to restore connection.";
internal const string DbConnectionString_ConnectRetryInterval = @"Delay between attempts to restore connection.";
internal const string DbConnectionString_ConnectTimeout = @"The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.";
internal const string DbConnectionString_CurrentLanguage = @"The SQL Server Language record name.";
internal const string DbConnectionString_DataSource = @"Indicates the name of the data source to connect to.";
internal const string DbConnectionString_Encrypt = @"When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.";
internal const string DbConnectionString_Enlist = @"Sessions in a Component Services (or MTS, if you are using Microsoft Windows NT) environment should automatically be enlisted in a global transaction where required.";
internal const string DbConnectionString_FailoverPartner = @"The name or network address of the instance of SQL Server that acts as a failover partner.";
internal const string DbConnectionString_InitialCatalog = @"The name of the initial catalog or database in the data source.";
internal const string DbConnectionString_IntegratedSecurity = @"Whether the connection is to be a secure connection or not.";
internal const string DbConnectionString_LoadBalanceTimeout = @"The minimum amount of time (in seconds) for this connection to live in the pool before being destroyed.";
internal const string DbConnectionString_MaxPoolSize = @"The maximum number of connections allowed in the pool.";
internal const string DbConnectionString_MinPoolSize = @"The minimum number of connections allowed in the pool.";
internal const string DbConnectionString_MultipleActiveResultSets = @"When true, multiple result sets can be returned and read from one connection.";
internal const string DbConnectionString_MultiSubnetFailover = @"If your application is connecting to a high-availability, disaster recovery (AlwaysOn) availability group (AG) on different subnets, MultiSubnetFailover=Yes configures SqlConnection to provide faster detection of and connection to the (currently) active server.";
internal const string DbConnectionString_PacketSize = @"Size in bytes of the network packets used to communicate with an instance of SQL Server.";
internal const string DbConnectionString_Password = @"Indicates the password to be used when connecting to the data source.";
internal const string DbConnectionString_PersistSecurityInfo = @"When false, security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.";
internal const string DbConnectionString_PoolBlockingPeriod = @"Defines the blocking period behavior for a connection pool.";
internal const string DbConnectionString_Pooling = @"When true, the connection object is drawn from the appropriate pool, or if necessary, is created and added to the appropriate pool.";
internal const string DbConnectionString_Replication = @"Used by SQL Server in Replication.";
internal const string DbConnectionString_TrustServerCertificate = @"When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate.";
internal const string DbConnectionString_TypeSystemVersion = @"Indicates which server type system the provider will expose through the DataReader.";
internal const string DbConnectionString_UserID = @"Indicates the user ID to be used when connecting to the data source.";
internal const string DbConnectionString_UserInstance = @"Indicates whether the connection will be re-directed to connect to an instance of SQL Server running under the user's account.";
internal const string DbConnectionString_WorkstationID = @"The name of the workstation connecting to SQL Server.";
internal const string DbConnectionString_TransactionBinding = @"Indicates binding behavior of connection to a System.Transactions Transaction when enlisted.";
internal const string TCE_DbConnectionString_ColumnEncryptionSetting = @"Default column encryption setting for all the commands on the connection.";
internal const string TCE_DbConnectionString_EnclaveAttestationUrl = @"Specifies an endpoint of an enclave attestation service, which will be used to verify whether the enclave, configured in the SQL Server instance for computations on database columns encrypted using Always Encrypted, is valid and secure.";
internal const string TCE_DbConnectionString_AttestationProtocol = @"Specifies an attestation protocol for its corresponding enclave attestation service.";
internal const string TCE_DbConnectionString_IPAddressPreference = @"Specifies an IP address preference when connecting to SQL instances.";
}
}
}

This file was deleted.

This file was deleted.

0 comments on commit 42850a9

Please sign in to comment.