共用方式為


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

背景工作的 IBackgroundTaskRegistration.TaskId ,當此 DatagramSocket的流量到達時,通訊端代理程式會觸發此工作。

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

背景工作的 IBackgroundTaskRegistration.TaskId ,當此 DatagramSocket的流量到達時,通訊端代理程式會觸發此工作。

屬性

另請參閱

適用於