internal SqlAuthenticationMethod ConvertValueToAuthenticationType() { if (!TryGetParsetableValue(KEY.Authentication, out string value)) { return(DEFAULT.Authentication); } try { return(DbConnectionStringBuilderUtil.ConvertToAuthenticationType(KEY.Authentication, value)); } catch (FormatException e) { throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e); } catch (OverflowException e) { throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e); } }
internal SqlAuthenticationMethod ConvertValueToAuthenticationType() { object value = base.Parsetable[KEY.Authentication]; string valStr = value as string; if (valStr == null) { return(DEFAULT.Authentication); } try { return(DbConnectionStringBuilderUtil.ConvertToAuthenticationType(KEY.Authentication, valStr)); } catch (FormatException e) { throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e); } catch (OverflowException e) { throw ADP.InvalidConnectionOptionValue(KEY.Authentication, e); } }
private static SqlAuthenticationMethod ConvertToAuthenticationType(string keyword, object value) { return(DbConnectionStringBuilderUtil.ConvertToAuthenticationType(keyword, value)); }