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