Partager via


IFileSystem.GetMonikerForFileSystemProviderAsync Method

Definition

Given the scheme for a file system provider, this method retrieves the provider's ServiceMoniker.

The service moniker can be used to create a ServiceRpcDescriptor for the provider using CreateFileSystemProviderServiceDescriptor(ServiceMoniker).

public:
 System::Threading::Tasks::Task<Microsoft::ServiceHub::Framework::ServiceMoniker ^> ^ GetMonikerForFileSystemProviderAsync(System::String ^ scheme, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceMoniker> GetMonikerForFileSystemProviderAsync (string scheme, System.Threading.CancellationToken cancellationToken);
abstract member GetMonikerForFileSystemProviderAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceMoniker>
Public Function GetMonikerForFileSystemProviderAsync (scheme As String, cancellationToken As CancellationToken) As Task(Of ServiceMoniker)

Parameters

scheme
String

The scheme for the provider.

cancellationToken
CancellationToken

The cancellation token.

Returns

The provider's service moniker.

Exceptions

scheme is null.

There is no file system provider for scheme.

Remarks

Fetching a proxy for the provider's IRemoteFileSystemProvider interface will return null if the provider does not support IRemoteFileSystemProvider.

Introduced in version FileSystem.

Applies to