Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace Microsoft.Data.Common
{
// @TODO: Theoretically this class could be replaced with SqlConnectionString.

[Serializable] // MDAC 83147
internal sealed class DbConnectionString
{
Expand Down Expand Up @@ -324,7 +324,7 @@ private void ValidateCombinedSet(DbConnectionString componentSet, DbConnectionSt
HashSet<string> component = new HashSet<string>(componentSet._restrictionValues);
combined.ExceptWith(component);
Debug.Assert(combined.Count == 0, "Combined set allows values not allowed by component set");
#endif
#endif
}
else if (combinedSet._behavior == KeyRestrictionBehavior.PreventUsage)
{
Expand All @@ -348,7 +348,7 @@ private void ValidateCombinedSet(DbConnectionString componentSet, DbConnectionSt
HashSet<string> component = new HashSet<string>(componentSet._restrictionValues);
combined.IntersectWith(component);
Debug.Assert(combined.Count == 0, "Combined values allows values prevented by component set");
#endif
#endif
}
else if (combinedSet._behavior == KeyRestrictionBehavior.PreventUsage)
{
Expand All @@ -360,7 +360,7 @@ private void ValidateCombinedSet(DbConnectionString componentSet, DbConnectionSt
HashSet<string> component = new HashSet<string>(componentSet._restrictionValues);
component.IntersectWith(combined);
Debug.Assert(component.Count == 0, "Combined values does not prevent all of the values prevented by the component set");
#endif
#endif
}
else
{
Expand Down Expand Up @@ -562,7 +562,7 @@ static internal string[] RemoveDuplicates(string[] restrictions)
return restrictions;
}

[ConditionalAttribute("DEBUG")]
[Conditional("DEBUG")]
private static void Verify(string[] restrictionValues)
{
if (restrictionValues != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public SqlCommandBuilder(SqlDataAdapter adapter) : this()
/// <devnote>SqlServer only supports CatalogLocation.Start</devnote>
[
Browsable(false),
EditorBrowsableAttribute(EditorBrowsableState.Never),
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public override CatalogLocation CatalogLocation
Expand All @@ -59,7 +59,7 @@ public override CatalogLocation CatalogLocation
/// <devnote>SqlServer only supports '.'</devnote>
[
Browsable(false),
EditorBrowsableAttribute(EditorBrowsableState.Never),
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public override string CatalogSeparator
Expand All @@ -80,8 +80,8 @@ public override string CatalogSeparator
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCommandBuilder.xml' path='docs/members[@name="SqlCommandBuilder"]/DataAdapter/*'/>
[
DefaultValue(null),
ResCategoryAttribute(nameof(Strings.DataCategory_Update)),
ResDescriptionAttribute(nameof(Strings.SqlCommandBuilder_DataAdapter)),
ResCategory(nameof(Strings.DataCategory_Update)),
ResDescription(nameof(Strings.SqlCommandBuilder_DataAdapter)),
]
public new SqlDataAdapter DataAdapter
{
Expand All @@ -99,7 +99,7 @@ public override string CatalogSeparator
/// <devnote>SqlServer only supports '.'</devnote>
[
Browsable(false),
EditorBrowsableAttribute(EditorBrowsableState.Never),
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public override string QuotePrefix
Expand All @@ -121,7 +121,7 @@ public override string QuotePrefix
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCommandBuilder.xml' path='docs/members[@name="SqlCommandBuilder"]/QuoteSuffix/*'/>
[
Browsable(false),
EditorBrowsableAttribute(EditorBrowsableState.Never),
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public override string QuoteSuffix
Expand All @@ -143,7 +143,7 @@ public override string QuoteSuffix
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCommandBuilder.xml' path='docs/members[@name="SqlCommandBuilder"]/SchemaSeparator/*'/>
[
Browsable(false),
EditorBrowsableAttribute(EditorBrowsableState.Never),
EditorBrowsable(EditorBrowsableState.Never),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public override string SchemaSeparator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,19 @@ public SqlRetryLogicBaseProvider RetryLogicProvider

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/ColumnEncryptionKeyCacheTtl/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Data))]
[ResCategory(nameof(Strings.DataCategory_Data))]
[ResDescription(nameof(Strings.TCE_SqlConnection_ColumnEncryptionKeyCacheTtl))]
public static TimeSpan ColumnEncryptionKeyCacheTtl { get; set; } = TimeSpan.FromHours(2);

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/ColumnEncryptionQueryMetadataCacheEnabled/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Data))]
[ResCategory(nameof(Strings.DataCategory_Data))]
[ResDescription(nameof(Strings.TCE_SqlConnection_ColumnEncryptionQueryMetadataCacheEnabled))]
public static bool ColumnEncryptionQueryMetadataCacheEnabled { get; set; } = true;

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/ColumnEncryptionTrustedMasterKeyPaths/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Data))]
[ResCategory(nameof(Strings.DataCategory_Data))]
[ResDescription(nameof(Strings.TCE_SqlConnection_TrustedColumnMasterKeyPaths))]
public static IDictionary<string, IList<string>> ColumnEncryptionTrustedMasterKeyPaths => _ColumnEncryptionTrustedMasterKeyPaths;

Expand Down Expand Up @@ -266,7 +266,7 @@ private SqlConnection(SqlConnection connection)

internal static bool TryGetSystemColumnEncryptionKeyStoreProvider(string keyStoreName, out SqlColumnEncryptionKeyStoreProvider provider)
{
return s_systemColumnEncryptionKeyStoreProviders.TryGetValue(keyStoreName, out provider);
return s_systemColumnEncryptionKeyStoreProviders.TryGetValue(keyStoreName, out provider);
}

/// <summary>
Expand Down Expand Up @@ -511,7 +511,7 @@ private void CacheConnectionStringProperties()
// connect the parser to the object.
// if there is no parser at this time we need to connect it after creation.
[DefaultValue(false)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Data))]
[ResCategory(nameof(Strings.DataCategory_Data))]
[ResDescription(nameof(Strings.SqlConnection_StatisticsEnabled))]
public bool StatisticsEnabled
{
Expand Down Expand Up @@ -645,9 +645,9 @@ internal int ConnectRetryInterval
#pragma warning disable 618 // ignore obsolete warning about RecommendedAsConfigurable to use SettingsBindableAttribute
[RecommendedAsConfigurable(true)]
#pragma warning restore 618
[SettingsBindableAttribute(true)]
[SettingsBindable(true)]
[RefreshProperties(RefreshProperties.All)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Data))]
[ResCategory(nameof(Strings.DataCategory_Data))]
[ResDescription(nameof(Strings.SqlConnection_ConnectionString))]
public override string ConnectionString
{
Expand Down Expand Up @@ -1202,7 +1202,7 @@ protected override DbProviderFactory DbProviderFactory
//

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/InfoMessage/*' />
[ResCategoryAttribute(nameof(Strings.DataCategory_InfoMessage))]
[ResCategory(nameof(Strings.DataCategory_InfoMessage))]
[ResDescription(nameof(Strings.DbConnection_InfoMessage))]
#if NET
public event SqlInfoMessageEventHandler InfoMessage;
Expand Down Expand Up @@ -1332,7 +1332,7 @@ public override void ChangeDatabase(string database)
SqlStatistics statistics = null;
RepairInnerConnection();
SqlClientEventSource.Log.TryCorrelationTraceEvent("SqlConnection.ChangeDatabase | API | Correlation | Object Id {0}, Activity Id {1}, Database {2}", ObjectID, ActivityCorrelator.Current, database);

try
{
statistics = SqlStatistics.StartTimer(Statistics);
Expand Down Expand Up @@ -1408,7 +1408,7 @@ public override void Close()

SqlStatistics statistics = null;
Exception e = null;

try
{
statistics = SqlStatistics.StartTimer(Statistics);
Expand Down Expand Up @@ -1901,7 +1901,7 @@ internal void Abort(Exception e)
}

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/OpenAsync/*' />
public override Task OpenAsync(CancellationToken cancellationToken)
public override Task OpenAsync(CancellationToken cancellationToken)
=> OpenAsync(SqlConnectionOverrides.None, cancellationToken);

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/OpenAsyncWithOverrides/*' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ private SqlDataAdapter(SqlDataAdapter from) : base(from)

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/DeleteCommand/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Update))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_DeleteCommand))]
[ResCategory(nameof(Strings.DataCategory_Update))]
[ResDescription(nameof(Strings.DbDataAdapter_DeleteCommand))]
new public SqlCommand DeleteCommand
{
get { return _deleteCommand; }
Expand All @@ -83,8 +83,8 @@ IDbCommand IDbDataAdapter.DeleteCommand

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/InsertCommand/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Update))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_InsertCommand))]
[ResCategory(nameof(Strings.DataCategory_Update))]
[ResDescription(nameof(Strings.DbDataAdapter_InsertCommand))]
new public SqlCommand InsertCommand
{
get { return _insertCommand; }
Expand All @@ -100,8 +100,8 @@ IDbCommand IDbDataAdapter.InsertCommand

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/SelectCommand/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Fill))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_SelectCommand))]
[ResCategory(nameof(Strings.DataCategory_Fill))]
[ResDescription(nameof(Strings.DbDataAdapter_SelectCommand))]
new public SqlCommand SelectCommand
{
get { return _selectCommand; }
Expand All @@ -117,8 +117,8 @@ IDbCommand IDbDataAdapter.SelectCommand

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/UpdateCommand/*' />
[DefaultValue(null)]
[ResCategoryAttribute(nameof(Strings.DataCategory_Update))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_UpdateCommand))]
[ResCategory(nameof(Strings.DataCategory_Update))]
[ResDescription(nameof(Strings.DbDataAdapter_UpdateCommand))]
new public SqlCommand UpdateCommand
{
get { return _updateCommand; }
Expand Down Expand Up @@ -243,8 +243,8 @@ protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow,
}

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/RowUpdated/*' />
[ResCategoryAttribute(nameof(Strings.DataCategory_Update))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_RowUpdated))]
[ResCategory(nameof(Strings.DataCategory_Update))]
[ResDescription(nameof(Strings.DbDataAdapter_RowUpdated))]
public event SqlRowUpdatedEventHandler RowUpdated
{
add
Expand All @@ -258,8 +258,8 @@ public event SqlRowUpdatedEventHandler RowUpdated
}

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/RowUpdating/*' />
[ResCategoryAttribute(nameof(Strings.DataCategory_Update))]
[ResDescriptionAttribute(nameof(Strings.DbDataAdapter_RowUpdating))]
[ResCategory(nameof(Strings.DataCategory_Update))]
[ResDescription(nameof(Strings.DbDataAdapter_RowUpdating))]
public event SqlRowUpdatingEventHandler RowUpdating
{
add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,7 @@ override public TextReader GetTextReader(int i)
}

/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/GetChar/*' />
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[EditorBrowsable(EditorBrowsableState.Never)]
override public char GetChar(int i)
{
throw ADP.NotSupported();
Expand Down Expand Up @@ -2388,7 +2388,7 @@ internal long GetStreamingXmlChars(int i, long dataIndex, char[] buffer, int buf

#if NETFRAMEWORK
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/System.Data.IDataRecord.GetData/*' />
[EditorBrowsableAttribute(EditorBrowsableState.Never)] // MDAC 69508
[EditorBrowsable(EditorBrowsableState.Never)] // MDAC 69508
IDataReader IDataRecord.GetData(int i)
{
throw ADP.NotSupported();
Expand Down
Loading
Loading