DatagramSocket.EnableTransferOwnership 方法

定义

重载

EnableTransferOwnership(Guid, SocketActivityConnectedStandbyAction)

使应用后台任务在系统处于连接待机状态时此 DatagramSocket 的流量到达时由套接字代理触发。

EnableTransferOwnership(Guid)

使应用的后台任务在应用未处于活动状态时此 DatagramSocket 的流量到达时由套接字代理触发。

EnableTransferOwnership(Guid, SocketActivityConnectedStandbyAction)

使应用后台任务在系统处于连接待机状态时此 DatagramSocket 的流量到达时由套接字代理触发。

public:
 virtual void EnableTransferOwnership(Platform::Guid taskId, SocketActivityConnectedStandbyAction connectedStandbyAction) = EnableTransferOwnership;
/// [Windows.Foundation.Metadata.Overload("EnableTransferOwnershipWithConnectedStandbyAction")]
void EnableTransferOwnership(winrt::guid const& taskId, SocketActivityConnectedStandbyAction const& connectedStandbyAction);
[Windows.Foundation.Metadata.Overload("EnableTransferOwnershipWithConnectedStandbyAction")]
public void EnableTransferOwnership(Guid taskId, SocketActivityConnectedStandbyAction connectedStandbyAction);
function enableTransferOwnership(taskId, connectedStandbyAction)
Public Sub EnableTransferOwnership (taskId As Guid, connectedStandbyAction As SocketActivityConnectedStandbyAction)

参数

taskId
Guid

Platform::Guid

winrt::guid

当流量到达此 DatagramSocket 时,套接字代理将触发的后台任务的 IBackgroundTaskRegistration.TaskId

connectedStandbyAction
SocketActivityConnectedStandbyAction

指定在流量到达时是启用或禁用后台任务的激活。

属性

另请参阅

适用于

EnableTransferOwnership(Guid)

使应用的后台任务在应用未处于活动状态时此 DatagramSocket 的流量到达时由套接字代理触发。

public:
 virtual void EnableTransferOwnership(Platform::Guid taskId) = EnableTransferOwnership;
/// [Windows.Foundation.Metadata.Overload("EnableTransferOwnership")]
void EnableTransferOwnership(winrt::guid const& taskId);
[Windows.Foundation.Metadata.Overload("EnableTransferOwnership")]
public void EnableTransferOwnership(Guid taskId);
function enableTransferOwnership(taskId)
Public Sub EnableTransferOwnership (taskId As Guid)

参数

taskId
Guid

Platform::Guid

winrt::guid

当流量到达此 DatagramSocket 时,套接字代理将触发的后台任务的 IBackgroundTaskRegistration.TaskId

属性

另请参阅

适用于