Exemple #1
0
 public UtlConnectionProxy(UtlConnectionOptions connectionOptions, UtlConnection owner)
 {
     this.ConnectionOptions = connectionOptions;
     this.Owner             = owner;
     this.Created           = DateTime.UtcNow.Ticks;
     this.IsPooled          = false;
 }
Exemple #2
0
 public UtlConnectionProxy(ISessionInterface sessionProxy, UtlConnectionOptions connectionOptions, UtlConnection owner)
 {
     this.SessionProxy      = sessionProxy;
     this.ConnectionOptions = connectionOptions;
     this.Owner             = owner;
     this.Created           = DateTime.UtcNow.Ticks;
     this.IsPooled          = false;
 }
Exemple #3
0
 public UtlConnection(ISessionInterface sessionProxy)
 {
     this._connectionState   = ConnectionState.Closed;
     this._connectionOptions = new UtlConnectionOptions();
     this._connectionString  = string.Empty;
     this.Version           += 1L;
     this.InnerConnection    = new UtlConnectionProxy(sessionProxy, this._connectionOptions, this);
     this._connectionState   = ConnectionState.Open;
 }
Exemple #4
0
 public UtlConnection(string connectionString)
 {
     this._connectionState   = ConnectionState.Closed;
     this._connectionOptions = new UtlConnectionOptions();
     this._connectionString  = string.Empty;
     if (!string.IsNullOrEmpty(connectionString))
     {
         this.ConnectionString = connectionString;
     }
 }
Exemple #5
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (disposing)
     {
         this.Close();
         this._connectionString  = string.Empty;
         this._connectionOptions = null;
     }
 }
Exemple #6
0
 public void Close()
 {
     if (!this._isClrSpConnection && (this.SessionProxy != null))
     {
         try
         {
             this.SessionProxy.Close();
         }
         catch (Exception)
         {
         }
         finally
         {
             this.SessionProxy      = null;
             this.Owner             = null;
             this.IsPooled          = false;
             this.Created           = 0L;
             this.ConnectionOptions = null;
         }
     }
 }
Exemple #7
0
 public UtlConnectionProxy(UtlConnectionOptions connectionOptions) : this(connectionOptions, null)
 {
 }