private Market(BetfairCon client, int connectionCount) { this.client = client; this.connectionCount = connectionCount; Task.Run(() => PollMarketBooks()); }
private MarketPeriodic(BetfairCon client, double periodInSec) { _client = client; _polling = Observable.Interval(TimeSpan.FromSeconds(periodInSec), NewThreadScheduler.Default).Subscribe(l => DoWork()); }
public static Market Create(BetfairCon client, int connectionCount) { if (listener == null) { listener = new Market(client, connectionCount); } return(listener); }
private List <betSnapshotTypeBetSnapshotItem> ExistBets(BetfairCon Bet, int MarketID) { var Currentbets = Bet.GetCurrentbets(new CurrentbetsFilter() { betResult = betStatusEnum.ACTIVE, ChannelID = MarketID }).Result; if (Currentbets.HasError) { if (Currentbets.Result.total > 0) { return(Currentbets.Result.betSnapshotItem); } } else { return(new List <betSnapshotTypeBetSnapshotItem>()); } return(new List <betSnapshotTypeBetSnapshotItem>()); }
public static MarketPeriodic Create(BetfairCon client, double periodInSec) { return(new MarketPeriodic(client, periodInSec)); }