Share via


AgentFactory.Close method

When overridden in a derived class, the Close method releases all resources used by the derived class.

Namespace:  Microsoft.Exchange.Data.Transport
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public Overridable Sub Close
'Usage
Dim instance As AgentFactory

instance.Close()
public virtual void Close()

Remarks

The Close method is called during shutdown of the transport services. Perform any cleanup that is required by your agent in this method.

Note

The transport service waits 90 seconds for the shutdown process to finish before it performs a hard exit. If the Close method has not been called or has not finished before the hard exit, the cleanup for your agent will be incomplete. You should perform cleanup in both the Close method and the AgentFactory constructor for your agent.

See also

Reference

AgentFactory class

AgentFactory members

Microsoft.Exchange.Data.Transport namespace