Interface ISessionEventStreamEvent
- Assembly
- Diffusion.Client.dll
The interface for an event delivered by the stream.
public interface ISessionEventStreamEvent
Properties
ChangedProperties
Returns the previous values of session properties that have changed.
IReadOnlyDictionary<string, string> ChangedProperties { get; }
Property Value
- IReadOnlyDictionary<string, string>
The previous values of session properties that have changed.
Remarks
This dictionary will be empty if no session properties were requested or the event did not result in a change of any properties.
This dictionary will only be populated if Type is PROPERTIES or SessionEventStreamEventState is RECONNECTED, FAILED_OVER, or DISCONNECTED.
This will only contain keys that have changed and not the whole required property set.
When a new property is added the value in this dictionary will be
null.
When a property is removed there will be a value in this dictionary but not in Properties.
CloseReason
Returns the reason a session was closed.
CloseReason CloseReason { get; }
Property Value
- CloseReason
The reason a session was closed.
Remarks
If SessionEventStreamEventState is CLOSED
this returns the reason the session was closed, otherwise null is returned.
IsOpenEvent
Convenience method to determine whether the event notifies the opening of a new session.
bool IsOpenEvent { get; }
Property Value
- bool
True if the event type is
STATEand the event state isACTIVE, otherwise false.
Remarks
This is equivalent to:
event.SessionEventStreamEventType == SessionEventStreamEventType.STATE &&
event.SessionEventStreamEventState == SessionEventStreamEventState.ACTIVE
Properties
Returns the session's properties.
IReadOnlyDictionary<string, string> Properties { get; }
Property Value
- IReadOnlyDictionary<string, string>
The session's properties.
Remarks
Only those properties requested when registering the listener will be present in the dictionary.
If no properties were requested or SessionEventStreamEventState is CLOSED the map will be empty.
SessionEventStreamEventState
Returns the current session state.
SessionEventStreamEventState SessionEventStreamEventState { get; }
Property Value
- SessionEventStreamEventState
The current session state.
SessionEventStreamEventType
Returns the event type.
SessionEventStreamEventType SessionEventStreamEventType { get; }
Property Value
- SessionEventStreamEventType
The event type.
SessionId
Returns the session identifier of the client session that the event relates to.
ISessionId SessionId { get; }
Property Value
- ISessionId
The session identifier of the client session that the event relates to.