AllJoynSession.Lost 事件

定义

重要

Windows.Devices.AllJoyn 命名空间中的类型已弃用,将来的 Windows 版本中可能不可用。 AllJoyn(由 AllSeen 联盟赞助)是一种开源发现和通信协议,适用于物联网 (IoT) 方案,例如打开和关闭灯以及读取温度。 有关 IoTivity LiteIoTivity 等替代项,请参阅 iotivity.org 网站。

当 AllJoynSession 丢失时触发的事件。 有关该事件的详细信息,请参阅关联的 AllJoynSessionLostEventArgs

// Register
event_token Lost(TypedEventHandler<AllJoynSession, AllJoynSessionLostEventArgs const&> const& handler) const;

// Revoke with event_token
void Lost(event_token const* cookie) const;

// Revoke with event_revoker
AllJoynSession::Lost_revoker Lost(auto_revoke_t, TypedEventHandler<AllJoynSession, AllJoynSessionLostEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("AllJoynSession has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("AllJoynSession has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
// Register
event_token Lost(TypedEventHandler<AllJoynSession, AllJoynSessionLostEventArgs const&> const& handler) const;

// Revoke with event_token
void Lost(event_token const* cookie) const;

// Revoke with event_revoker
AllJoynSession::Lost_revoker Lost(auto_revoke_t, TypedEventHandler<AllJoynSession, AllJoynSessionLostEventArgs const&> const& handler) const;
public event TypedEventHandler<AllJoynSession,AllJoynSessionLostEventArgs> Lost;
[add: Windows.Foundation.Metadata.Deprecated("AllJoynSession has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("AllJoynSession has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<AllJoynSession,AllJoynSessionLostEventArgs> Lost;
function onLost(eventArgs) { /* Your code */ }
allJoynSession.addEventListener("lost", onLost);
allJoynSession.removeEventListener("lost", onLost);
- or -
allJoynSession.onlost = onLost;
Public Custom Event Lost As TypedEventHandler(Of AllJoynSession, AllJoynSessionLostEventArgs) 

事件类型

属性

Windows 要求

应用功能
allJoyn

适用于