Table of Contents

Class DXFeedSubscription

Namespace
DxFeed.Graal.Net.Api
Assembly
DxFeed.Graal.Net.dll

Subscription for a set of symbols and event types. This class is a wrapper for SubscriptionNative. For more details see Javadoc.

public sealed class DXFeedSubscription : IObservableSubscription, IDisposable
Inheritance
DXFeedSubscription
Implements
Inherited Members

Properties

IsClosed

Gets a value indicating whether if this subscription is closed. Javadoc.

public bool IsClosed { get; }

Property Value

bool

Methods

AddEventListener(DXFeedEventListener)

Adds listener for events. Event lister can be added only when subscription is not producing any events. The subscription must be either empty (no symbols have been added). This method does nothing if this subscription is closed.

public void AddEventListener(DXFeedEventListener listener)

Parameters

listener DXFeedEventListener

The event listener.

AddSymbols(IEnumerable<object>)

Adds the specified collection of symbols to the set of subscribed symbols. All registered event listeners will receive update on the last events for all newly added symbols.

public void AddSymbols(IEnumerable<object> symbols)

Parameters

symbols IEnumerable<object>

The collection of symbols.

AddSymbols(params object[])

Adds the specified collection of symbols to the set of subscribed symbols. All registered event listeners will receive update on the last events for all newly added symbols.

public void AddSymbols(params object[] symbols)

Parameters

symbols object[]

The collection of symbols.

Clear()

Clears the set of subscribed symbols.

public void Clear()

Close()

Closes this subscription and makes it permanently detached.

public void Close()

Dispose()

Releases all resources used by the current instance of the DXFeedSubscription class.

public void Dispose()

GetEventTypes()

Gets a set of subscribed event types. The resulting set cannot be modified. Javadoc.

public ISet<Type> GetEventTypes()

Returns

ISet<Type>

Returns a set of subscribed event types.

GetSymbols()

Gets a set of subscribed symbols. The resulting set maybe either a snapshot of the set of the subscribed symbols at the time of invocation or a weakly consistent view of the set.

public ISet<object> GetSymbols()

Returns

ISet<object>

The collection of symbols.

IsContainsEventType(Type)

Gets a value indicating whether if this subscription contains the corresponding event type. Javadoc.

public bool IsContainsEventType(Type eventType)

Parameters

eventType Type

The event type.

Returns

bool

Returns true if this subscription contains the corresponding event type.

RemoveEventListener(DXFeedEventListener)

Removes listener for events.

public void RemoveEventListener(DXFeedEventListener listener)

Parameters

listener DXFeedEventListener

The event listener.

RemoveSymbols(IEnumerable<object>)

Removes the specified collection of symbols from the set of subscribed symbols.

public void RemoveSymbols(IEnumerable<object> symbols)

Parameters

symbols IEnumerable<object>

The collection of symbols.

RemoveSymbols(params object[])

Removes the specified collection of symbols from the set of subscribed symbols.

public void RemoveSymbols(params object[] symbols)

Parameters

symbols object[]

The collection of symbols.

SetSymbols(IEnumerable<object>)

Changes the set of subscribed symbols so that it contains just the symbols from the specified collection. To conveniently set subscription for just one or few symbols you can use SetSymbols(IEnumerable<object>).

public void SetSymbols(IEnumerable<object> symbols)

Parameters

symbols IEnumerable<object>

The collection of symbols.

SetSymbols(params object[])

Changes the set of subscribed symbols so that it contains just the symbols from the specified array. This is a convenience method to set subscription to one or few symbols at a time.

public void SetSymbols(params object[] symbols)

Parameters

symbols object[]

The collection of symbols.