Поделиться через


AllJoynSession.MemberAdded Событие

Определение

Важно!

Типы в пространстве имен Windows.Devices.AllJoyn являются устаревшими и могут быть недоступны в будущих версиях Windows. AllJoyn, спонсируемый AllSeen Alliance, был протоколом обнаружения и связи с открытым кодом для сценариев Интернета вещей, таких как включение и выключение света, а также чтение температуры. Альтернативные варианты, такие как IoTivity Lite и IoTivity, см. на веб-сайте iotivity.org .

Событие активируется при добавлении элемента в AllJoynSession.

// Register
event_token MemberAdded(TypedEventHandler<AllJoynSession, AllJoynSessionMemberAddedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
AllJoynSession::MemberAdded_revoker MemberAdded(auto_revoke_t, TypedEventHandler<AllJoynSession, AllJoynSessionMemberAddedEventArgs 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 MemberAdded(TypedEventHandler<AllJoynSession, AllJoynSessionMemberAddedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
AllJoynSession::MemberAdded_revoker MemberAdded(auto_revoke_t, TypedEventHandler<AllJoynSession, AllJoynSessionMemberAddedEventArgs const&> const& handler) const;
public event TypedEventHandler<AllJoynSession,AllJoynSessionMemberAddedEventArgs> MemberAdded;
[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,AllJoynSessionMemberAddedEventArgs> MemberAdded;
function onMemberAdded(eventArgs) { /* Your code */ }
allJoynSession.addEventListener("memberadded", onMemberAdded);
allJoynSession.removeEventListener("memberadded", onMemberAdded);
- or -
allJoynSession.onmemberadded = onMemberAdded;
Public Custom Event MemberAdded As TypedEventHandler(Of AllJoynSession, AllJoynSessionMemberAddedEventArgs) 

Тип события

Атрибуты

Требования к Windows

Возможности приложения
allJoyn

Применяется к