Partager via


MediaStreamingManager.SetMediaLibraryNameAsync Method (String)

 

Asynchronously sets the name of the Media Library that is shared on the server.

Namespace:   Microsoft.WindowsServerSolutions.MediaStreaming
Assembly:  MediaStreamingObjectModel (in MediaStreamingObjectModel.dll)

Syntax

public void SetMediaLibraryNameAsync(
    string mediaLibraryName
)
public:
void SetMediaLibraryNameAsync(
    String^ mediaLibraryName
)
Public Sub SetMediaLibraryNameAsync (
    mediaLibraryName As String
)

Parameters

  • mediaLibraryName
    Type: System.String

    The name of the Media Library that is shared on the server.

Examples

The following code example shows how to asynchronously set the Media Library name:

MediaStreamingManager msm = new MediaStreamingManager();

msm.SetMediaLibraryNameAsyncCompleted += 
   new EventHandler<MediaLibraryNameAsyncCompletedEventArgs>(
      msm_SetMediaLibraryNameAsyncCompleted); 
string mediaLibraryName = Guid.NewGuid().ToString("B");
msm.SetMediaLibraryNameAsync(mediaLibraryName);

The following code example shows how to implement the delegate method:

static void msm_SetMediaLibraryNameAsyncCompleted(object sender, 
   MediaLibraryNameAsyncCompletedEventArgs ea1)
{
   Console.WriteLine("Media Library Name = {0}", 
      ea1.MediaLibraryName);
}

See Also

MediaStreamingManager Class
Microsoft.WindowsServerSolutions.MediaStreaming Namespace

Return to top