PipelineComponent.ReleaseConnections Método

Definição

Libera as conexões estabelecidas durante AcquireConnections(Object). Chamado em tempo de design e em tempo de execução.

public:
 virtual void ReleaseConnections();
public virtual void ReleaseConnections ();
abstract member ReleaseConnections : unit -> unit
override this.ReleaseConnections : unit -> unit
Public Overridable Sub ReleaseConnections ()

Exemplos

private System.Data.OleDb.OleDbConnection oledbConnection;  
public override void ReleaseConnections()  
{  
    if (oledbConnection != null && oledbConnection.State != ConnectionState.Closed )  
        oledbConnection.Close();  
}  
Private oledbConnection As System.Data.OleDb.OleDbConnection   

Public Overrides Sub ReleaseConnections()   
 If Not (oledbConnection Is Nothing) AndAlso Not (oledbConnection.State = ConnectionState.Closed) Then   
   oledbConnection.Close   
 End If   
End Sub  

Comentários

Chamado repetidamente durante o design do componente e no final da execução do componente. Os componentes devem liberar todas as conexões que foram abertas e mantidas em AcquireConnections.

Aplica-se a