public TwitchController(DatabaseContext context, IDiscordClient client, ITwitchConnection twitch, IMemoryCache memoryCache)
 {
     _context = context;
     _client  = client;
     _twitch  = twitch;
     _cache   = memoryCache;
 }
 public TwitchStreamerViewModel(ITwitchAuthentication auth, ITwitchConnection twitchConnection)
     : base(auth, twitchConnection, AuthenticationType.TwitchStreamer,
            new PackIconOcticons {
     Kind = PackIconOcticonsKind.DeviceCameraVideo
 },
            "Streamer Account", "Twitch Stream Account Settings", new TwitchStreamerView())
 {
 }
Ejemplo n.º 3
0
 public TwitchBotViewModel(ITwitchAuthentication auth, ITwitchConnection twitchConnection)
     : base(auth, twitchConnection, AuthenticationType.TwitchBot,
            new PackIconMaterial {
     Kind = PackIconMaterialKind.Robot
 },
            "Bot Account", "Twitch Bot Account Settings", new TwitchBotView())
 {
 }
Ejemplo n.º 4
0
        protected TwitchAccountViewModel(ITwitchAuthentication twitchAuthentication,
                                         ITwitchConnection twitchConnection,
                                         AuthenticationType authType, object icon, object label, object toolTip, UserControl content)
            : base(icon, label, toolTip, content)
        {
            AuthType = authType;
            _twitchAuthentication = twitchAuthentication;
            _twitchConnection     = twitchConnection;
            ConnectCommand        = new ActionCommand(Connect);
            DisconnectCommand     = new ActionCommand(Disconnect);
            GenerateTokenCommand  = new ActionCommand(GenerateToken);
            ManualEntryCommand    = new ActionCommand(SwitchToManualEntry);

            if (!_twitchAuthentication.Credentials.ContainsKey(AuthType))
            {
                _twitchAuthentication.Credentials[AuthType] = new TwitchCredentials
                {
                    AuthType = authType
                };
            }
        }