/// <summary>
 /// Constructs a new instance of store connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString">Connection string for store.</param>
 /// <param name="secureCredential">Secure Credential for store.</param>
 /// <returns>An unopened instance of the store connection.</returns>
 public virtual IStoreConnection GetConnection(
     StoreConnectionKind kind,
     string connectionString,
     SqlCredential secureCredential)
 {
     return(new SqlStoreConnection(kind, connectionString, secureCredential));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlStoreConnection"/> class.
 /// </summary>
 /// <param name="kind">
 /// Type of store connection.
 /// </param>
 /// <param name="connectionString">
 /// The SQL connection string
 /// </param>
 /// <param name="secureCredential">
 /// The secure SQL Credential.
 /// </param>
 protected internal SqlStoreConnection(StoreConnectionKind kind, string connectionString, SqlCredential secureCredential)
 {
     this.Kind  = kind;
     this._conn = new SqlConnection {
         ConnectionString = connectionString, Credential = secureCredential
     };
 }
Esempio n. 3
0
        /// <summary>
        /// Sets the stub of SqlStoreConnectionFactory.GetConnection(StoreConnectionKind kind, String connectionString)
        /// </summary>
        public override IStoreConnection GetConnection(StoreConnectionKind kind, string connectionString)
        {
            Func <StoreConnectionKind, string, IStoreConnection> func1 = this.GetConnectionStoreConnectionKindString;

            if (func1 != null)
            {
                return(func1(kind, connectionString));
            }
            if (this.___callBase)
            {
                return(base.GetConnection(kind, connectionString));
            }
            return(this.InstanceBehavior.Result <StubSqlStoreConnectionFactory, IStoreConnection>(this, "GetConnection"));
        }
Esempio n. 4
0
 /// <summary>
 /// Constructs a new instance of store connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString">Connection string for store.</param>
 /// <returns>An unopened instance of the store connection.</returns>
 public virtual IStoreConnection GetConnection(StoreConnectionKind kind, string connectionString)
 {
     return(new SqlStoreConnection(kind, connectionString));
 }
 /// <summary>
 /// Constructs an instance of Sql Store Connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString"></param>
 protected internal SqlStoreConnection(StoreConnectionKind kind, string connectionString)
 {
     this.Kind = kind;
     _conn     = new SqlConnection();
     _conn.ConnectionString = connectionString;
 }
 /// <summary>
 /// Constructs an instance of Sql Store Connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString"></param>
 protected internal SqlStoreConnection(StoreConnectionKind kind, string connectionString)
 {
     this.Kind = kind;
     _conn = new SqlConnection();
     _conn.ConnectionString = connectionString;
 }
 /// <summary>
 /// Constructs a new instance of store connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString">Connection string for store.</param>
 /// <returns>An unopened instance of the store connection.</returns>
 public virtual IStoreConnection GetConnection(StoreConnectionKind kind, string connectionString)
 {
     return new SqlStoreConnection(kind, connectionString);
 }
 /// <summary>
 /// Constructs a new instance of store connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionInfo">Connection info.</param>
 /// <returns>An unopened instance of the store connection.</returns>
 public virtual IStoreConnection GetConnection(
     StoreConnectionKind kind,
     SqlConnectionInfo connectionInfo)
 {
     return(new SqlStoreConnection(kind, connectionInfo));
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlStoreConnection"/> class.
 /// </summary>
 /// <param name="kind">
 /// Type of store connection.
 /// </param>
 /// <param name="connectionInfo">
 /// The connection info.
 /// </param>
 protected internal SqlStoreConnection(StoreConnectionKind kind, SqlConnectionInfo connectionInfo)
 {
     this.Kind  = kind;
     this._conn = connectionInfo.CreateConnection();
 }
 /// <summary>
 /// Sets the stub of SqlStoreConnectionFactory.GetConnection(StoreConnectionKind kind, String connectionString)
 /// </summary>
 public override IStoreConnection GetConnection(
     StoreConnectionKind kind,
     string connectionString)
 {
     return(GetConnection(kind, connectionString, null));
 }
 /// <summary>
 /// Sets the stub of SqlStoreConnectionFactory.GetConnection(StoreConnectionKind kind, String connectionString)
 /// </summary>
 public override IStoreConnection GetConnection(StoreConnectionKind kind, string connectionString)
 {
     Func<StoreConnectionKind, string, IStoreConnection> func1 = this.GetConnectionStoreConnectionKindString;
     if (func1 != null)
         return func1(kind, connectionString);
     if (this.___callBase)
         return base.GetConnection(kind, connectionString);
     return this.InstanceBehavior.Result<StubSqlStoreConnectionFactory, IStoreConnection>(this, "GetConnection");
 }
 /// <summary>
 /// Constructs a new instance of store connection.
 /// </summary>
 /// <param name="kind">Type of store connection.</param>
 /// <param name="connectionString">Connection string for store.</param>
 /// <returns>An unopened instance of the store connection.</returns>
 public virtual IStoreConnection GetConnection(
     StoreConnectionKind kind,
     string connectionString)
 {
     return(this.GetConnection(kind, connectionString, null));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlStoreConnection"/> class.
 /// </summary>
 /// <param name="kind">
 /// Type of store connection.
 /// </param>
 /// <param name="connectionString">
 /// The SQL connection string
 /// </param>
 protected internal SqlStoreConnection(StoreConnectionKind kind, string connectionString)
     : this(kind, connectionString, null)
 {
 }