IsolatedWindowsEnvironment.ShareFileAsync 方法

定义

重载

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

已弃用。 与独立 Windows 环境共享主机文件。

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

已弃用。 与具有遥测关联的独立 Windows 环境共享主机文件。

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

已弃用。 与独立 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)

参数

filePath
String

Platform::String

winrt::hstring

主机文件路径的字符串。

返回

IsolatedWindowsEnvironmentShareFileResult

属性

Windows 要求

设备系列
Windows 10, version 2104 (在 10.0.20348.0 中引入)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (在 v3.0 中引入)

注解

警告

这是一个已弃用的 API。

共享文件应出现在一个文件夹中,其中包含独立 Windows 环境中的随机生成的文件路径,该路径将在 IsolatedWindowsEnvironmentShareFileResult 中提供。 写入此文件夹的任何数据都将复制回主机。 建议在 IsolatedWindowsEnvironmentShareFileRequestOptions 中将 AllowWrite 标志设置为 false,以防止这种情况。

适用于

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

已弃用。 与具有遥测关联的独立 Windows 环境共享主机文件。

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)

参数

filePath
String

Platform::String

winrt::hstring

主机文件路径的字符串。

返回

IsolatedWindowsEnvironmentShareFileResult

属性

Windows 要求

设备系列
Windows 10, version 2104 (在 10.0.20348.0 中引入)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (在 v3.0 中引入)

注解

警告

这是一个已弃用的 API。

共享文件应出现在一个文件夹中,其中包含独立 Windows 环境中的随机生成的文件路径,该路径将在 IsolatedWindowsEnvironmentShareFileResult 中提供。 写入此文件夹的任何数据都将复制回主机。 建议在 isolatedwindowsenvironmentsharefilerequestoptions 中将 AllowWrite 标志设置为 false,以防止这种情况。

适用于