CollaborationPlatform.BeginShutdown Method

Shuts down the platform and all known endpoints.

Namespace:  Microsoft.Rtc.Collaboration
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

public IAsyncResult BeginShutdown(
	AsyncCallback userCallback,
	Object state


Type: System.AsyncCallback
The method to be called when the asynchronous operation is completed.
Type: System.Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.

When it is shut down, the platform terminates all the endpoints and frees all its resources. The platform cannot be used after this completes.

This operation should never throw.

The example shows how to shutdown a platform. The example assumes that a platform was previously started successfully. Applications can always attempt to shutdown a platform without error even if it is already shut down.

C# Platform uninitialization


        platform.BeginShutdown(this.PlatformShutdownCompleted, platform /*state*/);

        private void PlatformShutdownCompleted(IAsyncResult result)
            // Platform shutdown never throws, but EndShutdown needs to be called
            // to ensure resources are freed.
            CollaborationPlatform platform = result.AsyncState as CollaborationPlatform;
            Console.WriteLine("Platform shutdown completed.");