internal void SetInnerConnectionTo(DbConnectionInternal to) { Debug.Assert(null != _innerConnection, "null InnerConnection"); Debug.Assert(null != to, "to null InnerConnection"); _innerConnection = to; }
internal void SetInnerConnectionTo(DbConnectionInternal to) { this._innerConnection = to; }
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml' path='docs/members[@name="SqlConnection"]/ctor2/*' /> public SqlConnection() : base() { GC.SuppressFinalize(this); _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; }
public OleDbConnection() { this.ObjectID = Interlocked.Increment(ref _objectTypeCount); GC.SuppressFinalize(this); this._innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; }
internal bool SetInnerConnectionFrom(DbConnectionInternal to, DbConnectionInternal from) { return(from == Interlocked.CompareExchange <DbConnectionInternal>(ref this._innerConnection, to, from)); }
protected override IAsyncResult BeginCreateConnection (DbConnectionBase owningObject, DbConnectionString connectionOptions, DbConnectionInternal connection, AsyncCallback callback, object asyncStateObject) { throw new NotImplementedException (); }
internal override void SetInnerConnectionTo(DbConnection owningObject, DbConnectionInternal to) { (owningObject as OdbcConnection)?.SetInnerConnectionTo(to); }
protected override IAsyncResult BeginCreateConnection(DbConnectionBase owningObject, DbConnectionString connectionOptions, DbConnectionInternal connection, AsyncCallback callback, object asyncStateObject) { throw new NotImplementedException(); }
private OleDbConnectionInternal GetOpenConnection() { DbConnectionInternal innerConnection = InnerConnection; return((innerConnection as OleDbConnectionInternal) !); }
protected override DbMetaDataFactory CreateMetaDataFactory(DbConnectionInternal internalConnection) { throw new NotImplementedException(); }
protected internal new DbMetaDataFactory GetMetaDataFactory(DbConnectionString connectionOptions, DbConnectionInternal internalConnection) { throw new NotImplementedException(); }
public CONNECTIONOBJECTNAME() : base() { GC.SuppressFinalize(this); _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; }
override protected DbMetaDataFactory CreateMetaDataFactory(DbConnectionInternal internalConnection, out bool cacheMetaDataFactory) { Debug.Assert(internalConnection != null, "internalConnection may not be null."); cacheMetaDataFactory = false; OdbcConnection odbcOuterConnection = ((OdbcConnectionOpen)internalConnection).OuterConnection; Debug.Assert(odbcOuterConnection != null, "outer connection may not be null."); NameValueCollection settings = (NameValueCollection)PrivilegedConfigurationManager.GetSection("system.data.odbc"); Stream XMLStream = null; // get the DBMS Name object driverName = null; string stringValue = odbcOuterConnection.GetInfoStringUnhandled(ODBC32.SQL_INFO.DRIVER_NAME); if (stringValue != null) { driverName = stringValue; } if (settings != null) { string[] values = null; string metaDataXML = null; // first try to get the provider specific xml // if driver name is not supported we can't build the settings key needed to // get the provider specific XML path if (driverName != null) { metaDataXML = ((string)driverName) + _MetaData; values = settings.GetValues(metaDataXML); } // if we did not find provider specific xml see if there is new default xml if (values == null) { metaDataXML = _defaultMetaDataXml; values = settings.GetValues(metaDataXML); } // If there is an XML file get it if (values != null) { XMLStream = ADP.GetXmlStreamFromValues(values, metaDataXML); } } // use the embedded xml if the user did not over ride it if (XMLStream == null) { XMLStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("System.Data.Odbc.OdbcMetaData.xml"); cacheMetaDataFactory = true; } Debug.Assert(XMLStream != null, "XMLstream may not be null."); String versionString = odbcOuterConnection.GetInfoStringUnhandled(ODBC32.SQL_INFO.DBMS_VER); return(new OdbcMetaDataFactory(XMLStream, versionString, versionString, odbcOuterConnection)); }
internal override bool SetInnerConnectionFrom(DbConnection owningObject, DbConnectionInternal to, DbConnectionInternal from) { OleDbConnection connection = owningObject as OleDbConnection; return((connection != null) && connection.SetInnerConnectionFrom(to, from)); }
override internal bool SetInnerConnectionFrom(DbConnection owningObject, DbConnectionInternal to, DbConnectionInternal from) { SqlConnection c = (owningObject as SqlConnection); if (null != c) { return(c.SetInnerConnectionFrom(to, from)); } return(false); }
private DbMetaDataFactory GetMetaDataFactory(DbConnectionInternal internalConnection) { return(this.ConnectionFactory.GetMetaDataFactory(this._poolGroup, internalConnection)); }
protected internal new DbMetaDataFactory GetMetaDataFactory (DbConnectionString connectionOptions, DbConnectionInternal internalConnection) { throw new NotImplementedException (); }
internal DbMetaDataFactory GetMetaDataFactoryInternal(DbConnectionInternal internalConnection) { return(this.GetMetaDataFactory(internalConnection)); }
protected override DbMetaDataFactory CreateMetaDataFactory (DbConnectionInternal internalConnection) { throw new NotImplementedException (); }
internal override void SetInnerConnectionEvent(DbConnection owningObject, DbConnectionInternal to) { (owningObject as OleDbConnection)?.SetInnerConnectionEvent(to); }