Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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
)

Parameters

userCallback
Type: System.AsyncCallback
The method to be called when the asynchronous operation is completed.
state
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;
            platform.EndShutdown(result);
            Console.WriteLine("Platform shutdown completed.");

        }



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.