Exemple #1
0
 //Function: TwitchClient
 //
 //The constructor for this class.
 //
 //Parameters:
 //channel - the name of the channel to connect to
 //trigger - a refrence to the timer shared by all <TwitchClient> objects, triggers the event handler
 //queue - a refrence to the queue shared by all the <TwitchClient> objects and the <KafkaProducer>
 //blacklist - the users who ar enot participating and should be ignored
 public TwitchClientReader(string channel, Shared.Dispatch dispatch)
 {
     Console.WriteLine("Twitch Message Fetch Object Start");
     this.cycles        = 0;
     this.GameQueue     = dispatch.GetGameQueue();
     this.DatabaseQueue = dispatch.GetDatabaseQueue();
     this.channel       = channel;
 }
        /**
         * The constructor for <ThreadController>
         * Initialises all objs and threads needed for the <GameApplication> to run
         */
        public ThreadController(Shared.Dispatch dispatch)
        {
            gameMessageQueue = dispatch.GetGameQueue();
            twitchOutQueue   = dispatch.GetTwitchOutQueue();
            discordOutQueue  = dispatch.GetDiscordOutQueue();

            encounters   = new List <KeyValuePair <string, Threads.EncounterController> >();
            cooldownList = new List <KeyValuePair <string, System.Timers.Timer> >();
            active       = true;
        }