Interface ISessionEventStreamEvent

The interface for an event delivered by the stream.

Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients
Assembly: Diffusion.Client.dll
Syntax
public interface ISessionEventStreamEvent

Properties

ChangedProperties

Returns the previous values of session properties that have changed.

Declaration
IReadOnlyDictionary<string, string> ChangedProperties { get; }
Property Value
Type Description
IReadOnlyDictionary<System.String, System.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 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.

Declaration
CloseReason CloseReason { get; }
Property Value
Type Description
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.

Declaration
bool IsOpenEvent { get; }
Property Value
Type Description
System.Boolean

True if the event type is STATE and the event state is ACTIVE, otherwise false.

Remarks

This is equivalent to:

event.SessionEventStreamEventType == SessionEventStreamEventType.STATE &&
event.SessionEventStreamEventState == SessionEventStreamEventState.ACTIVE

Properties

Returns the session's properties.

Declaration
IReadOnlyDictionary<string, string> Properties { get; }
Property Value
Type Description
IReadOnlyDictionary<System.String, System.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.

Declaration
SessionEventStreamEventState SessionEventStreamEventState { get; }
Property Value
Type Description
SessionEventStreamEventState

The current session state.

SessionEventStreamEventType

Returns the event type.

Declaration
SessionEventStreamEventType SessionEventStreamEventType { get; }
Property Value
Type Description
SessionEventStreamEventType

The event type.

SessionId

Returns the session identifier of the client session that the event relates to.

Declaration
ISessionId SessionId { get; }
Property Value
Type Description
ISessionId

The session identifier of the client session that the event relates to.

Back to top