Method | Description | |
---|---|---|
AddRate ( string currency, string targetCurrency, string bid, string ask, ITopicControlAddContextCallback |
Adds a new conversion rate in terms of base currency and target currency. The bid and ask rates are entered as strings which may be a decimal value; this will be parsed and validated, rounding to 5 decimal places. If a zero-length string ("") is supplied, the rate will be set to 'empty' and clients will receive a zero-length string in the initial load.
|
|
ChangeBidRate ( string currency, string targetCurrency, string bid, ITopicUpdaterUpdateContextCallback |
Updates just the 'bid' value for a specified rate. This method demonstrates the alternative 'delta' mechanism of updating. In this example it does not make much sense, but for records with many fields where you know only one is changing, this negates the need to send the whole topic state in each update.
|
|
ChangeRate ( string currency, string targetCurrency, string bid, string ask, ITopicUpdaterUpdateContextCallback |
Update a rate. The rate in question must have been added first using AddRate otherwise this will fail. The bid and ask rates are entered as strings which may be a decimal value; this will be parsed and validated, rounding to 5 decimal places. A zero-length string may be supplied to indicate 'no rate available'. The server will compare the supplied values with the current values, and if different will notify clients of a delta of change. Only changed fields are notified to clients - unchanged fields are passed as a zero-length string. If a field has changed to zero length, the client will receive the special empty field value in the delta.
|
|
Close ( ) : void |
Close the session.
|
|
ControlClientUpdatingRecordTopics ( string serverUrl ) : System |
Constructor.
|
|
RemoveCurrency ( string currency, ITopicControlRemoveContextCallback |
Removes a currency (removes its topics and all subordinate rate topics).
|
|
RemoveRate ( string currency, string targetCurrency, ITopicControlRemoveContextCallback |
Remove a rate (removes its topic).
|
Method | Description | |
---|---|---|
CreateRateContent ( string bid, string ask ) : IContent |
Create rate contents for a full update.
|
|
RateTopicName ( string currency, string targetCurrency ) : string |
Generates a hierarchical topic name for a rate topic. e.g. for currency=GBP and targetCurrency=USD, this would return "FX/GBP/USD".
|
public AddRate ( string currency, string targetCurrency, string bid, string ask, ITopicControlAddContextCallback |
||
currency | string | The base currency (e.g. GBP). |
targetCurrency | string | The target current (e.g. USD). |
bid | string | The 'bid' rate. |
ask | string | The 'ask' rate. |
callback | ITopicControlAddContextCallback |
A callback which will be called to report the outcome. The context in the callback /// wil be currency/target currency (e.g. "GBP/USD"). |
return | void |
public ChangeBidRate ( string currency, string targetCurrency, string bid, ITopicUpdaterUpdateContextCallback |
||
currency | string | The base currency. |
targetCurrency | string | The target currency. |
bid | string | The new bid rate which can be an empty string to set to 'not available'. |
callback | ITopicUpdaterUpdateContextCallback |
A callback which will be called to report the outcome. The context in the callback /// will be currency/targetCurrency (e.g. "GBP/USD". |
return | void |
public ChangeRate ( string currency, string targetCurrency, string bid, string ask, ITopicUpdaterUpdateContextCallback |
||
currency | string | The base currency. |
targetCurrency | string | The target currency. |
bid | string | The new bid rate. |
ask | string | The new ask rate. |
callback | ITopicUpdaterUpdateContextCallback |
A callback which will be called to report the outcome. The context in the callback /// will be currency/target currency (e.g. "GBP/USD"). |
return | void |
public ControlClientUpdatingRecordTopics ( string serverUrl ) : System | ||
serverUrl | string | The server url, for example "ws://diffusion.example.com:80". |
return | System |
public RemoveCurrency ( string currency, ITopicControlRemoveContextCallback |
||
currency | string | The base currency. |
callback | ITopicControlRemoveContextCallback |
Reports the outcome. |
return | void |
public RemoveRate ( string currency, string targetCurrency, ITopicControlRemoveContextCallback |
||
currency | string | The base currency. |
targetCurrency | string | The target currency. |
callback | ITopicControlRemoveContextCallback |
Reports the outcome. |
return | void |