Partager via


MediaStreamingManager.SetMediaLibraryName Method (String)

 

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 SetMediaLibraryName(
    string mediaLibraryName
)
public:
void SetMediaLibraryName(
    String^ mediaLibraryName
)
Public Sub SetMediaLibraryName (
    mediaLibraryName As String
)

Parameters

  • mediaLibraryName
    Type: System.String

    The name of the Media Library that is shared.

Exceptions

Exception Condition
ArgumentNullException

mediaLibraryName is null.

ArgumentException

mediaLibraryName is an empty string or is longer than 44 characters.

SecurityAccessDeniedException

The caller is not a local administrator.

ProviderNotAvailableException

The media streaming provider cannot be contacted.

Examples

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

MediaStreamingManager mediaStreamingManager = new MediaStreamingManager();
string mediaLibraryName = Guid.NewGuid().ToString("B"); 
mediaStreamingManager.SetMediaLibraryName(mediaLibraryName);

See Also

MediaStreamingManager Class
Microsoft.WindowsServerSolutions.MediaStreaming Namespace

Return to top