Skip to main content

EventSubscription

Assembly: ServiceStack.dll
View Source
Declaration
public class EventSubscription : SubscriptionInfo, IEventSubscription, IDisposable

Properties

LastPulseAt

View Source
Declaration
public DateTime LastPulseAt { get; set; }

DisposeMaxWaitMs

How long to wait to obtain lock before force disposing subscription connection

View Source
Declaration
public static int DisposeMaxWaitMs { get; set; }

IsDisposed

View Source
Declaration
public bool IsDisposed { get; }

Response

View Source
Declaration
public IResponse Response { get; }

Request

View Source
Declaration
public IRequest Request { get; }

LastMessageId

View Source
Declaration
public long LastMessageId { get; }

MergedChannels

View Source
Declaration
public string[] MergedChannels { get; set; }

OnUnsubscribeAsync

View Source
Declaration
public Func<IEventSubscription, Task> OnUnsubscribeAsync { get; set; }

OnUnsubscribe

View Source
Declaration
public Action<IEventSubscription> OnUnsubscribe { get; set; }

OnPublish

View Source
Declaration
public Action<IEventSubscription, IResponse, string> OnPublish { get; set; }

OnPublishAsync

View Source
Declaration
public Func<IEventSubscription, IResponse, string, Task> OnPublishAsync { get; set; }

OnHungConnection

View Source
Declaration
public Action<IEventSubscription> OnHungConnection { get; set; }

OnDispose

View Source
Declaration
public Action<IEventSubscription> OnDispose { get; set; }

WriteEvent

View Source
Declaration
public Action<IResponse, string> WriteEvent { get; set; }

WriteEventAsync

View Source
Declaration
public Func<IResponse, string, CancellationToken, Task> WriteEventAsync { get; set; }

OnError

View Source
Declaration
public Action<IEventSubscription, Exception> OnError { get; set; }

IsClosed

View Source
Declaration
public bool IsClosed { get; }

JsonArgs

View Source
Declaration
public string JsonArgs { get; }

IsLocked

View Source
Declaration
public bool IsLocked { get; }

Inherited Properties

Channels

View Source
Declaration
public string[] Channels { get; set; }

ConnectArgs

View Source
Declaration
public Dictionary<string, string> ConnectArgs { get; set; }

CreatedAt

View Source
Declaration
public DateTime CreatedAt { get; set; }

DisplayName

View Source
Declaration
public string DisplayName { get; set; }

IsAuthenticated

View Source
Declaration
public bool IsAuthenticated { get; set; }

Meta

View Source
Declaration
public ConcurrentDictionary<string, string> Meta { get; set; }

ServerArgs

View Source
Declaration
public Dictionary<string, string> ServerArgs { get; set; }

SessionId

View Source
Declaration
public string SessionId { get; set; }

SubscriptionId

View Source
Declaration
public string SubscriptionId { get; set; }

UserAddress

View Source
Declaration
public string UserAddress { get; set; }

UserId

View Source
Declaration
public string UserId { get; set; }

UserName

View Source
Declaration
public string UserName { get; set; }

Fields

UnknownChannel

View Source
Declaration
public static string[] UnknownChannel

Methods

UpdateChannels(String[])

View Source
Declaration
public void UpdateChannels(string[] channels)
Parameters
TypeName
System.String[]channels

Pulse()

View Source
Declaration
public void Pulse()

Publish(String)

View Source
Declaration
public void Publish(string selector)
Parameters
TypeName
System.Stringselector

PublishAsync(String, String, CancellationToken)

View Source
Declaration
public Task PublishAsync(string selector, string message, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Stringselector
System.Stringmessage
System.Threading.CancellationTokentoken

PublishRawAsync(String, CancellationToken)

View Source
Declaration
public async Task PublishRawAsync(string frame, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Stringframe
System.Threading.CancellationTokentoken

Publish(String, String)

View Source
Declaration
public void Publish(string selector, string message)
Parameters
TypeName
System.Stringselector
System.Stringmessage

PublishRaw(String)

View Source
Declaration
public void PublishRaw(string frame)
Parameters
TypeName
System.Stringframe

Unsubscribe()

View Source
Declaration
[Obsolete("Use UnsubscribeAsync. Will be removed in future.")]
public void Unsubscribe()

UnsubscribeAsync()

View Source
Declaration
public Task UnsubscribeAsync()
Returns

System.Threading.Tasks.Task

SerializeDictionary(IDictionary<String, String>)

View Source
Declaration
public static string SerializeDictionary(IDictionary<string, string> map)
Returns

System.String

Parameters
TypeName
System.Collections.Generic.IDictionary<System.String,System.String>map

Dispose()

View Source
Declaration
public void Dispose()

Release()

View Source
Declaration
public void Release()

Implements