@@ -772,12 +772,23 @@ internal static bool IsAzureSynapseOnDemandEndpoint(string dataSource)
772
772
|| dataSource . Contains ( PBI_DATAWAREHOUSE3 ) ;
773
773
}
774
774
775
+ /// <summary>
776
+ /// Represents a collection of Azure SQL Server endpoint URLs for various regions and environments.
777
+ /// </summary>
778
+ /// <remarks>This array includes endpoint URLs for Azure SQL in global, Germany, US Government,
779
+ /// China, and Fabric environments. These endpoints are used to identify and interact with Azure SQL services
780
+ /// in their respective regions or environments.</remarks>
775
781
internal static readonly string [ ] s_azureSqlServerEndpoints = { AZURE_SQL ,
776
782
AZURE_SQL_GERMANY ,
777
783
AZURE_SQL_USGOV ,
778
784
AZURE_SQL_CHINA ,
779
785
AZURE_SQL_FABRIC } ;
780
786
787
+ /// <summary>
788
+ /// Contains endpoint strings for Azure SQL Server on-demand services.
789
+ /// Each entry is a combination of the ONDEMAND_PREFIX and a specific Azure SQL endpoint string.
790
+ /// Example format: "ondemand.database.windows.net".
791
+ /// </summary>
781
792
internal static readonly string [ ] s_azureSqlServerOnDemandEndpoints = { ONDEMAND_PREFIX + AZURE_SQL ,
782
793
ONDEMAND_PREFIX + AZURE_SQL_GERMANY ,
783
794
ONDEMAND_PREFIX + AZURE_SQL_USGOV ,
@@ -823,9 +834,8 @@ private static bool IsEndpoint(string dataSource, string[] endpoints)
823
834
}
824
835
825
836
// check if servername ends with any endpoints
826
- for ( int index = 0 ; index < endpoints . Length ; index ++ )
837
+ foreach ( var endpoint in endpoints )
827
838
{
828
- string endpoint = endpoints [ index ] ;
829
839
if ( length > endpoint . Length )
830
840
{
831
841
if ( string . Compare ( dataSource , length - endpoint . Length , endpoint , 0 , endpoint . Length , StringComparison . OrdinalIgnoreCase ) == 0 )
0 commit comments