Compartilhar via


IsolatedWindowsEnvironment.ShareFileAsync Método

Definição

Sobrecargas

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

Preterido. Compartilhe o arquivo de host com o Ambiente Isolado do Windows.

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

Preterido. Compartilhe o arquivo de host com o Ambiente Isolado do Windows com correlação de telemetria.

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

Preterido. Compartilhe o arquivo de host com o Ambiente Isolado do Windows.

public:
 virtual IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult ^> ^ ShareFileAsync(Platform::String ^ filePath, IsolatedWindowsEnvironmentShareFileRequestOptions ^ options) = ShareFileAsync;
/// [Windows.Foundation.Metadata.Overload("ShareFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options);
/// [Windows.Foundation.Metadata.Overload("ShareFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options);
[Windows.Foundation.Metadata.Overload("ShareFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options);
[Windows.Foundation.Metadata.Overload("ShareFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options);
function shareFileAsync(filePath, options)
Public Function ShareFileAsync (filePath As String, options As IsolatedWindowsEnvironmentShareFileRequestOptions) As IAsyncOperation(Of IsolatedWindowsEnvironmentShareFileResult)

Parâmetros

filePath
String

Platform::String

winrt::hstring

Cadeia de caracteres do caminho do arquivo de host.

Retornos

IsolatedWindowsEnvironmentShareFileResult

Atributos

Requisitos do Windows

Família de dispositivos
Windows 10, version 2104 (introduzida na 10.0.20348.0)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (introduzida na v3.0)

Comentários

Aviso

Essa é uma API preterida.

O arquivo compartilhado deve aparecer em uma pasta com um caminho de arquivo gerado aleatoriamente no Ambiente isolado do Windows que será fornecido no IsolatedWindowsEnvironmentShareFileResult. Todos os dados gravados nessa pasta serão copiados de volta para o host. É recomendável definir o sinalizador AllowWrite como false em IsolatedWindowsEnvironmentShareFileRequestOptions para evitar isso.

Aplica-se a

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

Preterido. Compartilhe o arquivo de host com o Ambiente Isolado do Windows com correlação de telemetria.

public:
 virtual IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult ^> ^ ShareFileAsync(Platform::String ^ filePath, IsolatedWindowsEnvironmentShareFileRequestOptions ^ options, IsolatedWindowsEnvironmentTelemetryParameters ^ telemetryParameters) = ShareFileAsync;
/// [Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options, IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters);
/// [Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options, IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters);
[Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options, IsolatedWindowsEnvironmentTelemetryParameters telemetryParameters);
[Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options, IsolatedWindowsEnvironmentTelemetryParameters telemetryParameters);
function shareFileAsync(filePath, options, telemetryParameters)
Public Function ShareFileAsync (filePath As String, options As IsolatedWindowsEnvironmentShareFileRequestOptions, telemetryParameters As IsolatedWindowsEnvironmentTelemetryParameters) As IAsyncOperation(Of IsolatedWindowsEnvironmentShareFileResult)

Parâmetros

filePath
String

Platform::String

winrt::hstring

Cadeia de caracteres do caminho do arquivo de host.

telemetryParameters
IsolatedWindowsEnvironmentTelemetryParameters

Parâmetros de telemetria definidos por IsolatedWindowsEnvironmentTelemetryParameters

Retornos

IsolatedWindowsEnvironmentShareFileResult

Atributos

Requisitos do Windows

Família de dispositivos
Windows 10, version 2104 (introduzida na 10.0.20348.0)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (introduzida na v3.0)

Comentários

Aviso

Essa é uma API preterida.

O arquivo compartilhado deve aparecer em uma pasta com um caminho de arquivo gerado aleatoriamente no Ambiente isolado do Windows que será fornecido no IsolatedWindowsEnvironmentShareFileResult. Todos os dados gravados nessa pasta serão copiados de volta para o host. É recomendável definir o sinalizador AllowWrite como false em isolatedwindowsenvironmentsharefilerequestoptions para evitar isso.

Aplica-se a