共用方式為


StreamSocketListener.EnableTransferOwnership 方法

定義

多載

EnableTransferOwnership(Guid)

當此 StreamSocketListener 的流量在應用程式未使用時送達時,讓通訊端代理程式觸發應用程式的背景工作。

EnableTransferOwnership(Guid, SocketActivityConnectedStandbyAction)

當此 StreamSocketListener 的流量在系統處於連線待命狀態時,讓通訊端代理程式觸發應用程式的背景工作。

EnableTransferOwnership(Guid)

當此 StreamSocketListener 的流量在應用程式未使用時送達時,讓通訊端代理程式觸發應用程式的背景工作。

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

當此StreamSocketListener的流量送達時,通訊端代理程式將觸發的背景工作IBackgroundTaskRegistration.TaskId

屬性

另請參閱

適用於

EnableTransferOwnership(Guid, SocketActivityConnectedStandbyAction)

當此 StreamSocketListener 的流量在系統處於連線待命狀態時,讓通訊端代理程式觸發應用程式的背景工作。

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

當此StreamSocketListener的流量送達時,通訊端代理程式將觸發的背景工作IBackgroundTaskRegistration.TaskId

connectedStandbyAction
SocketActivityConnectedStandbyAction

指定在流量到達時,是否要啟用或停用背景工作啟用。

屬性

另請參閱

適用於