AllJoynBusAttachment.StateChanged Evento

Definizione

Importante

I tipi nello spazio dei nomi Windows.Devices.AllJoyn sono deprecati e potrebbero non essere disponibili nelle versioni future di Windows. AllJoyn, sponsorizzato da AllSeen Alliance, è stato un protocollo di individuazione e comunicazione open source per scenari IoT (Internet of Things), ad esempio l'accensione e la disattivazione delle luci e la lettura delle temperature. Per alternative, ad esempio IoTivity Lite e IoTivity, fare riferimento al sito Web di iotivity.org .

Si verifica quando lo stato dell'allegato del bus cambia. L'enumerazione AllJoynBusAttachmentState definisce i possibili valori di stato.

// Register
event_token StateChanged(TypedEventHandler<AllJoynBusAttachment, AllJoynBusAttachmentStateChangedEventArgs const&> const& handler) const;

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

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

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

// Revoke with event_revoker
AllJoynBusAttachment::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<AllJoynBusAttachment, AllJoynBusAttachmentStateChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<AllJoynBusAttachment,AllJoynBusAttachmentStateChangedEventArgs> StateChanged;
[add: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<AllJoynBusAttachment,AllJoynBusAttachmentStateChangedEventArgs> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
allJoynBusAttachment.addEventListener("statechanged", onStateChanged);
allJoynBusAttachment.removeEventListener("statechanged", onStateChanged);
- or -
allJoynBusAttachment.onstatechanged = onStateChanged;
Public Custom Event StateChanged As TypedEventHandler(Of AllJoynBusAttachment, AllJoynBusAttachmentStateChangedEventArgs) 

Tipo evento

Attributi

Requisiti Windows

Funzionalità dell'app
allJoyn

Si applica a