Esempio n. 1
0
 public static bool IsWindowsSSPI(string connectionstring)
 {
     return(RegexValidHelper.IsWindowsSSPI(connectionstring));
 }
Esempio n. 2
0
 public static string GetInitialCatalog(string connectionstring)
 {
     return(RegexValidHelper.MatchInitialCatalog(connectionstring));
 }
Esempio n. 3
0
 /// <summary>
 /// 取连接字符串的Data Source。适用于System.Data.OracleClient标准连接字符串。
 /// </summary>
 /// <param name="connectionstring">Example:Data Source=yichun;User Id=gtdj;Password=123;Integrated Security=no;</param>
 /// <returns>string</returns>
 public static string GetDataSource(string connectionstring)
 {
     //Regex r = new Regex(@"^Data Source=(?<datasource>;*\w+)");
     //return r.Match(connectionstring).Result("${datasource}");
     return(RegexValidHelper.MatchDataSource(connectionstring));
 }
Esempio n. 4
0
 /// <summary>
 /// 取连接字符串的用户名。适用于System.Data.OracleClient标准连接字符串。
 /// </summary>
 /// <param name="connectionstring">Example:Data Source=yichun;User Id=gtdj;Password=123;Integrated Security=no;</param>
 /// <returns>string</returns>
 public static string GetUserId(string connectionstring)
 {
     //Regex r = new Regex(@"User Id=(?<userid>\w+);*");
     //return r.Match(connectionstring).Result("${userid}");
     return(RegexValidHelper.MatchUserId(connectionstring));
 }
Esempio n. 5
0
 public static string GetSQLServer2005UserId(string connectionstring)
 {
     return(RegexValidHelper.MatchSQLServer2005UserId(connectionstring));
 }
Esempio n. 6
0
 /// <summary>
 /// 取连接字符串的口令。适用于System.Data.OracleClient标准连接字符串。
 /// </summary>
 /// <param name="connectionstring">Example:Data Source=yichun;User Id=gtdj;Password=123;Integrated Security=no;</param>
 /// <returns>string</returns>
 public static string GetPassword(string connectionstring)
 {
     return(RegexValidHelper.MatchPassword(connectionstring));
     //Regex r = new Regex(@"Password=(?<passwsd>\w+);?");
     //return r.Match(connectionstring).Result("${passwsd}");
 }