dxFeed .Net API  5.8.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
com.dxfeed.ipf.impl.InstrumentProfileComposer Class Reference

Composer for Instrument Profile Simple File Format. Please see Instrument Profile Format documentation for complete description. More...

Inheritance diagram for com.dxfeed.ipf.impl.InstrumentProfileComposer:
[legend]
Collaboration diagram for com.dxfeed.ipf.impl.InstrumentProfileComposer:
[legend]

Public Member Functions

 InstrumentProfileComposer (Stream outStream)
 Creates a new instrument profile composer. More...
 
void Dispose ()
 Dispose object. More...
 
void Compose (IList< InstrumentProfile > profiles, bool skipRemoved)
 Atomically captures profile types to work correctly when profile type is being changed concurrently, otherwise, the method is not thread-safe. More...
 
void ComposeNewLine ()
 Writes a new line. More...
 
void ComposeFlush ()
 Writes FLUSH command More...
 
void ComposeComplete ()
 Writes COMPLETE command. More...
 

Private Member Functions

void CaptureTypes (IList< InstrumentProfile > profiles)
 
void WriteFormats (IList< InstrumentProfile > profiles, bool skipRemoved)
 Writes formats from list. More...
 
void WriteFormat (string type)
 Writes format. More...
 
void WriteProfiles (IList< InstrumentProfile > profiles, bool skipRemoved)
 Writes profiles from list. More...
 
void WriteProfile (string type, InstrumentProfile ip)
 Write profile. More...
 

Private Attributes

Dictionary< string, HashSet< InstrumentProfileField > > enumFormats = new Dictionary<string, HashSet<InstrumentProfileField>>()
 
Dictionary< string, HashSet< string > > customFormats = new Dictionary<string, HashSet<string>>()
 
List< string > types = new List<string>()
 
CSVWriter writer
 

Static Private Attributes

static readonly InstrumentProfileField [] fields = InstrumentProfileField.Values
 
static readonly string REMOVED_TYPE = InstrumentProfileType.REMOVED.Name
 

Detailed Description

Composer for Instrument Profile Simple File Format. Please see Instrument Profile Format documentation for complete description.

Constructor & Destructor Documentation

◆ InstrumentProfileComposer()

com.dxfeed.ipf.impl.InstrumentProfileComposer.InstrumentProfileComposer ( Stream  outStream)
inline

Creates a new instrument profile composer.

Parameters
outStream
Exceptions
System.ArgumentNullException
System.ArgumentException

Member Function Documentation

◆ CaptureTypes()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.CaptureTypes ( IList< InstrumentProfile profiles)
inlineprivate

◆ Compose()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.Compose ( IList< InstrumentProfile profiles,
bool  skipRemoved 
)
inline

Atomically captures profile types to work correctly when profile type is being changed concurrently, otherwise, the method is not thread-safe.

Parameters
profilesList of instrument profiles.
skipRemovedWhen skipRemoved == true, it ignores removed instruments when composing.
Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.
System.InvalidOperationExceptionCan't format certain profile.

◆ ComposeComplete()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.ComposeComplete ( )
inline

Writes COMPLETE command.

Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.

◆ ComposeFlush()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.ComposeFlush ( )
inline

Writes FLUSH command

Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.

◆ ComposeNewLine()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.ComposeNewLine ( )
inline

Writes a new line.

Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.

◆ Dispose()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.Dispose ( )
inline

Dispose object.

Exceptions
System.IO.IOExceptionIf an I/O error occurs.

◆ WriteFormat()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.WriteFormat ( string  type)
inlineprivate

Writes format.

Parameters
type
Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.

◆ WriteFormats()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.WriteFormats ( IList< InstrumentProfile profiles,
bool  skipRemoved 
)
inlineprivate

Writes formats from list.

Parameters
profiles
skipRemoved
Exceptions
System.ArgumentExceptionIf attempt to write record without fields was made.
System.IO.IOExceptionIf an I/O error occurs.
System.InvalidOperationExceptionCan't format profile field.

◆ WriteProfile()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.WriteProfile ( string  type,
InstrumentProfile  ip 
)
inlineprivate

Write profile.

Parameters
type
ip
Exceptions
System.InvalidOperationExceptionCan't format certain profile.
System.IO.IOExceptionIf an I/O error occurs.

◆ WriteProfiles()

void com.dxfeed.ipf.impl.InstrumentProfileComposer.WriteProfiles ( IList< InstrumentProfile profiles,
bool  skipRemoved 
)
inlineprivate

Writes profiles from list.

Parameters
profiles
skipRemoved
Exceptions
System.InvalidOperationExceptionCan't format certain profile.
System.IO.IOExceptionIf an I/O error occurs.

Field Documentation

◆ customFormats

Dictionary<string, HashSet<string> > com.dxfeed.ipf.impl.InstrumentProfileComposer.customFormats = new Dictionary<string, HashSet<string>>()
private

◆ enumFormats

Dictionary<string, HashSet<InstrumentProfileField> > com.dxfeed.ipf.impl.InstrumentProfileComposer.enumFormats = new Dictionary<string, HashSet<InstrumentProfileField>>()
private

◆ fields

readonly InstrumentProfileField [] com.dxfeed.ipf.impl.InstrumentProfileComposer.fields = InstrumentProfileField.Values
staticprivate

◆ REMOVED_TYPE

readonly string com.dxfeed.ipf.impl.InstrumentProfileComposer.REMOVED_TYPE = InstrumentProfileType.REMOVED.Name
staticprivate

◆ types

List<string> com.dxfeed.ipf.impl.InstrumentProfileComposer.types = new List<string>()
private

◆ writer

CSVWriter com.dxfeed.ipf.impl.InstrumentProfileComposer.writer
private

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