MediaStreamingManager.GetSharedFolders Method ()
Provides a collection of shared folders on the server.
Namespace: Microsoft.WindowsServerSolutions.MediaStreaming
Assembly: MediaStreamingObjectModel (in MediaStreamingObjectModel.dll)
Syntax
public ReadOnlyCollection<MediaStreamingSharedFolder> GetSharedFolders()
public:
ReadOnlyCollection<MediaStreamingSharedFolder^>^ GetSharedFolders()
Public Function GetSharedFolders As ReadOnlyCollection(Of MediaStreamingSharedFolder)
Return Value
Type: System.Collections.ObjectModel.ReadOnlyCollection<MediaStreamingSharedFolder>
AReadOnlyCollection<T> of shared folders on the server.
Exceptions
Exception | Condition |
---|---|
SecurityAccessDeniedException | The caller is not a local administrator. |
ProviderNotAvailableException | The media streaming provider cannot be contacted. |
Remarks
Volumes that are not shared are not included in the returned list list.
After this method returns, the returned list is not updated with changes. To get an updated list, call this method again.
Examples
The following code example shows how to retrieve a list of shared folders and write the folder names:
MediaStreamingManager mediaStreamingManager = new MediaStreamingManager();
ReadOnlyCollection<MediaStreamingSharedFolder> shares =
mediaStreamingManager.GetSharedFolders();
foreach (MediaStreamingSharedFolder share in shares)
{
Console.WriteLine("Shared Folder Name = {0}", share.Name);
}
See Also
MediaStreamingManager Class
Microsoft.WindowsServerSolutions.MediaStreaming Namespace
Return to top