public static void Reset() { if (_instance != null) { _instance.CleanUp(); _instance = null; } }
public static Task ConfigureAsync(IConfig config) { if (_instance != null) { throw new InvalidOperationException("Matchmore static instance already configured"); } config.SetupDefaults(); _instance = new Matchmore(config); return(Task.CompletedTask); }
public MatchmoreDataStore() { items = new HashSet <Item>(); matchmore = Matchmore.SDK.Matchmore.Instance; var monitor = matchmore.SubscribeMatches(); monitor.MatchReceived += (sender, e) => { foreach (var match in e.Matches) { items.Add(new Item(match.Publication)); } }; monitor.Start(); }
public PollingMatchMonitor(Matchmore client, Device deviceToSubscribe) { _client = client; _deviceToSubscribe = deviceToSubscribe; }
public WebsocketMatchMonitor(Matchmore client, Device deviceToSubscribe, string worldId) { _client = client; _deviceToSubscribe = deviceToSubscribe; _worldId = worldId; }