Exemple #1
0
 public static void Reset()
 {
     if (_instance != null)
     {
         _instance.CleanUp();
         _instance = null;
     }
 }
Exemple #2
0
        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();
        }
Exemple #4
0
 public PollingMatchMonitor(Matchmore client, Device deviceToSubscribe)
 {
     _client            = client;
     _deviceToSubscribe = deviceToSubscribe;
 }
Exemple #5
0
 public WebsocketMatchMonitor(Matchmore client, Device deviceToSubscribe, string worldId)
 {
     _client            = client;
     _deviceToSubscribe = deviceToSubscribe;
     _worldId           = worldId;
 }