internal System.Data.SqlClient.ApplicationIntent ConvertValueToApplicationIntent()
{
string value;
if (!TryGetParsetableValue(KEY.ApplicationIntent, out value))
{
return DEFAULT.ApplicationIntent;
}
// when wrong value is used in the connection string provided to SqlConnection.ConnectionString or c-tor,
// wrap Format and Overflow exceptions with Argument one, to be consistent with rest of the keyword types (like int and bool)
try
{
return DbConnectionStringBuilderUtil.ConvertToApplicationIntent(KEY.ApplicationIntent, value);
}
catch (FormatException e)
{
throw ADP.InvalidConnectionOptionValue(KEY.ApplicationIntent, e);
}
catch (OverflowException e)
{
throw ADP.InvalidConnectionOptionValue(KEY.ApplicationIntent, e);
}
// ArgumentException and other types are raised as is (no wrapping)
}
internal void ThrowUnsupportedIfKeywordSet(string keyword)