Sdk Class |
public sealed class Sdk : IStartable, IDisposable
The Sdk type exposes the following members.
Name | Description | |
---|---|---|
BetPal |
BetPal provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
Instance | SDK singleton instance. | |
IsInitialized | True if the SDK initialized, false otherwise. See the Initialize. | |
IsStarted | True if the SDK started, false otherwise. See the Initialize. | |
Lcoo |
Live Cycle of Odds provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOdds |
LivePlex provider. BetPal and LiveOdds combined in single feed.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVbl |
LiveOdds Virtual Basketball League provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVdr |
LiveOdds Virtual Football League provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVfc |
LiveOdds Virtual Football cup provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVfl |
LiveOdds Virtual Football League provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVhc |
LiveOdds Virtual Football League provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveOddsVto |
LiveOdds Virtual Tennis Open provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LivePlex |
LivePlex provider. BetPal and LiveOdds combined in single feed.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
LiveScout |
LiveScout provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
OddsCreator |
OddsCreator provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
| |
QueueStats | Queue statistics. | |
SoccerRoulette |
SoccerRoulette provider.
Remarks Initialize must be called before accessing this member.
If provider is not enabled through configuration, this member will be null.
|
Name | Description | |
---|---|---|
Dispose | Releases unmanaged resources held by an instance of this class. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Initialize | Initialize the SDK. Default section name is used from the app.config. DEFAULT_SECTION_NAME | |
Initialize(IConfigFactory, IDeadLetterQueue) | Initialize the SDK. | |
Initialize(String, IDeadLetterQueue) | Initialize the SDK. | |
Start |
Starts the SDK instance but does not start the configured feed providers (e.g. LiveScout or LiveOdds).
SDK message dispatcher pump will start delivering messages after this.
Remarks
Feed providers should be started explicitly after SDK singleton is started.
| |
Stop | Stops the SDK. Stops the message pump and all feeds. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
OnQueueLimits | Indicates that a queue limit (NORMAL, LOW, HIGH) was either reached or retreated for a specific queue. |
try { Sdk.Instance.Initialize(); Sdk.Instance.OnQueueLimits += QueueLimits; Sdk.Instance.OnQueueLimitRetreated += QueueLimitRetreated; Sdk.Instance.Start(); if (Sdk.Instance.LiveOdds != null) { Sdk.Instance.LiveOdds.OnConnectionStable += FlagConnectionAsStable; Sdk.Instance.LiveOdds.OnConnectionUnstable += ConnectionUnstable; Sdk.Instance.LiveOdds.OnAlive += AliveReceived; Sdk.Instance.LiveOdds.OnFeedError += FeedErrorOccurred; Sdk.Instance.LiveOdds.OnBetCancel += MatchBetCancelled; Sdk.Instance.LiveOdds.OnBetCancelUndo += MatchBetCancelUndo; Sdk.Instance.LiveOdds.OnBetClear += MatchBetCleared; Sdk.Instance.LiveOdds.OnBetClearRollback += MatchBetClearRollbacked; Sdk.Instance.LiveOdds.OnBetStart += BetStarted; Sdk.Instance.LiveOdds.OnBetStop += BetStopped; Sdk.Instance.LiveOdds.OnMetaInfo += MetaInfoReceived; Sdk.Instance.LiveOdds.OnOddsChange += OddsChanged; Sdk.Instance.LiveOdds.OnScoreCardSummary += ScoreCardReceived; Sdk.Instance.LiveOdds.Start(); } else { throw new ApplicationException("Error initializing SDK.LiveOdds provider"); } /* ... start using the SDK ... */ Console.ReadLine(); } finally { if (Sdk.Instance.LiveOdds != null) { Sdk.Instance.LiveOdds.Stop(); Sdk.Instance.LiveOdds.OnConnectionStable -= FlagConnectionAsStable; Sdk.Instance.LiveOdds.OnConnectionUnstable -= ConnectionUnstable; Sdk.Instance.LiveOdds.OnAlive -= AliveReceived; Sdk.Instance.LiveOdds.OnFeedError -= FeedErrorOccurred; Sdk.Instance.LiveOdds.OnBetCancel -= MatchBetCancelled; Sdk.Instance.LiveOdds.OnBetCancelUndo -= MatchBetCancelUndo; Sdk.Instance.LiveOdds.OnBetClear -= MatchBetCleared; Sdk.Instance.LiveOdds.OnBetClearRollback -= MatchBetClearRollbacked; Sdk.Instance.LiveOdds.OnBetStart -= BetStarted; Sdk.Instance.LiveOdds.OnBetStop -= BetStopped; Sdk.Instance.LiveOdds.OnMetaInfo -= MetaInfoReceived; Sdk.Instance.LiveOdds.OnOddsChange -= OddsChanged; Sdk.Instance.LiveOdds.OnScoreCardSummary -= ScoreCardReceived; } Sdk.Instance.OnQueueLimits -= QueueLimits; Sdk.Instance.OnQueueLimitRetreated -= QueueLimitRetreated; Sdk.Instance.Stop(); }