dxFeed .Net API  5.13.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Member Functions | Static Public Attributes | Properties | Private Member Functions | Private Attributes
com.dxfeed.native.NativeSnapshotSubscription Class Reference

Class provides native snapshot subscription More...

Inheritance diagram for com.dxfeed.native.NativeSnapshotSubscription:
[legend]
Collaboration diagram for com.dxfeed.native.NativeSnapshotSubscription:
[legend]

Public Member Functions

 NativeSnapshotSubscription (NativeConnection connection, long time, IDxSnapshotListener listener)
 Creates new native order or candle subscription on snapshot. More...
 
 NativeSnapshotSubscription (NativeConnection connection, EventType eventType, long time, IDxSnapshotListener listener)
 Creates new native snapshot subscription with specified event type. More...
 
void Dispose ()
 Dispose native snapshot subscription More...
 
void AddSymbol (string symbol)
 Add symbol to subscription. More...
 
void AddSymbol (CandleSymbol symbol)
 Add candle symbol to subscription. More...
 
void AddSymbols (params string[] symbols)
 Add multiply symbols to subscription. More...
 
void AddSymbols (params CandleSymbol[] symbols)
 Add multiply candle symbols to subscription. More...
 
void RemoveSymbols (params string[] symbols)
 
void RemoveSymbols (params CandleSymbol[] symbols)
 
void SetSymbols (params string[] symbols)
 Set multiply symbols to subscription. More...
 
void SetSymbols (params CandleSymbol[] symbols)
 Set multiply symbols to subscription. More...
 
void Clear ()
 
IList< string > GetSymbols ()
 Get all symbols from subscription. More...
 
void AddSource (params string[] sources)
 Add events.OrderSource to subscription. More...
 
void SetSource (params string[] sources)
 Remove existing events.OrderSource from subscription and set new. More...
 

Static Public Attributes

static IntPtr InvalidSnapshot = IntPtr.Zero
 Invalid snapshot More...
 

Properties

string Symbol [get]
 Get symbol of snapshot More...
 

Private Member Functions

void OnEvent (IntPtr snapshotDataPtr, IntPtr userData)
 

Private Attributes

readonly IntPtr connectionPtr
 
IntPtr snapshotPtr = InvalidSnapshot
 
readonly IDxSnapshotListener listener
 
C.dxf_snapshot_listener_t callback
 
long time = 0
 
string source = string.Empty
 
EventType eventType = EventType.None
 
NativeConnection connection = null
 

Detailed Description

Class provides native snapshot subscription

Constructor & Destructor Documentation

◆ NativeSnapshotSubscription() [1/2]

com.dxfeed.native.NativeSnapshotSubscription.NativeSnapshotSubscription ( NativeConnection  connection,
long  time,
IDxSnapshotListener  listener 
)
inline

Creates new native order or candle subscription on snapshot.

Parameters
connectionNative connection pointer.
timeMilliseconds time in the past.
listenerSnapshot events listener.
Exceptions
ArgumentNullExceptionListener is invalid.

◆ NativeSnapshotSubscription() [2/2]

com.dxfeed.native.NativeSnapshotSubscription.NativeSnapshotSubscription ( NativeConnection  connection,
EventType  eventType,
long  time,
IDxSnapshotListener  listener 
)
inline

Creates new native snapshot subscription with specified event type.

Parameters
connectionNative connection pointer.
eventTypeSingle event type.
timeMilliseconds time in the past.
listenerSnapshot events listener.
Exceptions
ArgumentNullExceptionListener is invalid.

Member Function Documentation

◆ AddSource()

void com.dxfeed.native.NativeSnapshotSubscription.AddSource ( params string []  sources)
inline

Add events.OrderSource to subscription.

Parameters
sourcesList of events.OrderSource names.
Exceptions
ArgumentExceptionInvalid sources parameter.
InvalidOperationExceptionYou try to add more than one source to subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [1/2]

void com.dxfeed.native.NativeSnapshotSubscription.AddSymbol ( string  symbol)
inline

Add symbol to subscription.

Parameters
symbolSymbol.
Exceptions
ArgumentExceptionInvalid symbol parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [2/2]

void com.dxfeed.native.NativeSnapshotSubscription.AddSymbol ( CandleSymbol  symbol)
inline

Add candle symbol to subscription.

Parameters
symbolCandleSymbol.
Exceptions
ArgumentExceptionInvalid symbol parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [1/2]

void com.dxfeed.native.NativeSnapshotSubscription.AddSymbols ( params string []  symbols)
inline

Add multiply symbols to subscription.

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbol parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [2/2]

void com.dxfeed.native.NativeSnapshotSubscription.AddSymbols ( params CandleSymbol []  symbols)
inline

Add multiply candle symbols to subscription.

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ Clear()

void com.dxfeed.native.NativeSnapshotSubscription.Clear ( )
inline

Clear all symbols from subscription.

Snapshot will be IDisposable.Dispose().

Exceptions
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ Dispose()

void com.dxfeed.native.NativeSnapshotSubscription.Dispose ( )
inline

Dispose native snapshot subscription

Exceptions
NativeDxSubscription

◆ GetSymbols()

IList<string> com.dxfeed.native.NativeSnapshotSubscription.GetSymbols ( )
inline

Get all symbols from subscription.

Returns
List of subscribed symbols.
Exceptions
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ OnEvent()

void com.dxfeed.native.NativeSnapshotSubscription.OnEvent ( IntPtr  snapshotDataPtr,
IntPtr  userData 
)
inlineprivate

◆ RemoveSymbols() [1/2]

void com.dxfeed.native.NativeSnapshotSubscription.RemoveSymbols ( params string []  symbols)
inline

Remove multiply symbols from subscription.

Snapshot will be disposed if symbols contains snapshot symbol (for Snapshots only).

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbols parameter.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ RemoveSymbols() [2/2]

void com.dxfeed.native.NativeSnapshotSubscription.RemoveSymbols ( params CandleSymbol []  symbols)
inline

Remove multiply symbols from subscription.

Snapshot will be disposed if symbols contains snapshot symbol (for Snapshots only).

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSource()

void com.dxfeed.native.NativeSnapshotSubscription.SetSource ( params string []  sources)
inline

Remove existing events.OrderSource from subscription and set new.

Parameters
sourcesList of events.OrderSource names.
Exceptions
ArgumentExceptionInvalid sources parameter.
InvalidOperationExceptionYou try to add more than one source to subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [1/2]

void com.dxfeed.native.NativeSnapshotSubscription.SetSymbols ( params string []  symbols)
inline

Set multiply symbols to subscription.

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [2/2]

void com.dxfeed.native.NativeSnapshotSubscription.SetSymbols ( params CandleSymbol []  symbols)
inline

Set multiply symbols to subscription.

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

Field Documentation

◆ callback

C.dxf_snapshot_listener_t com.dxfeed.native.NativeSnapshotSubscription.callback
private

◆ connection

NativeConnection com.dxfeed.native.NativeSnapshotSubscription.connection = null
private

◆ connectionPtr

readonly IntPtr com.dxfeed.native.NativeSnapshotSubscription.connectionPtr
private

◆ eventType

EventType com.dxfeed.native.NativeSnapshotSubscription.eventType = EventType.None
private

◆ InvalidSnapshot

IntPtr com.dxfeed.native.NativeSnapshotSubscription.InvalidSnapshot = IntPtr.Zero
static

Invalid snapshot

◆ listener

readonly IDxSnapshotListener com.dxfeed.native.NativeSnapshotSubscription.listener
private

◆ snapshotPtr

IntPtr com.dxfeed.native.NativeSnapshotSubscription.snapshotPtr = InvalidSnapshot
private

◆ source

string com.dxfeed.native.NativeSnapshotSubscription.source = string.Empty
private

◆ time

long com.dxfeed.native.NativeSnapshotSubscription.time = 0
private

Property Documentation

◆ Symbol

string com.dxfeed.native.NativeSnapshotSubscription.Symbol
get

Get symbol of snapshot


The documentation for this class was generated from the following file: