/// <summary>
 /// Sets the connection.
 /// </summary>
 /// <param name="Name">The name of the connection.</param>
 /// <param name="Connection">The OracleSqlConnectionString instance.</param>
 public static void Set(string Name, OracleSqlConnectionString Connection)
 {
     if (String.IsNullOrWhiteSpace(Name))
     {
         throw new ArgumentException("Name argument should not be empty.");
     }
     if (Regex.IsMatch(Name, @"\W"))
     {
         throw new ArgumentException("Name argument should only contain any word character (letter, number, underscore).");
     }
     OracleSqlConnectionString._SetConnection(Name, Connection.ToString());
 }
 /// <summary>
 /// Tests the connection string if it is valid.
 /// </summary>
 /// <returns>True if the connection string is valid. Otherwise, false.</returns>
 public static bool TestConnection()
 {
     return(OracleSqlConnectionString.TestConnection(OracleSqlConnectionString.Read()));
 }
 /// <summary>
 /// Reads the connection by name.
 /// </summary>
 /// <returns>The connection.</returns>
 public static string Read()
 {
     return(OracleSqlConnectionString.Read(OracleSqlConfig.DefaultConnection));
 }
 /// <summary>
 /// Sets the connection.
 /// </summary>
 /// <param name="Connection">The OracleSqlConnectionString instance.</param>
 public static void Set(OracleSqlConnectionString Connection)
 {
     OracleSqlConnectionString.Set(OracleSqlConfig.DefaultConnection, Connection);
 }
 /// <summary>
 /// Static constructor.
 /// </summary>
 static OracleSqlConnectionString()
 {
     OracleSqlConnectionString._InitStaticProperties();
 }
 /// <summary>
 /// Executes a non-query and returns a OracleSqlNonData instance.
 /// </summary>
 /// <param name="Queries">The instance/s of OracleSqlBuilderNonQuery.</param>
 /// <returns>The instance of OracleSqlNonData.</returns>
 internal OracleSqlNonData Execute(params OracleSqlBuilderNonQuery[] Queries)
 {
     return(this.Execute(OracleSqlConnectionString.Read("default"), Queries));
 }
Пример #7
0
 /// <summary>
 /// Executes a query and returns a OracleSqlData instance.
 /// </summary>
 /// <param name="SelectCount">The instance of OracleSqlBuilderSelectCount.</param>
 /// <returns>The instance of OracleSqlData.</returns>
 internal OracleSqlData Execute(OracleSqlBuilderSelectCount SelectCount)
 {
     return(this.Execute(OracleSqlConnectionString.Read(), SelectCount));
 }