public StreamingService(BotService bot, RocksmithService rocksmith) { // Бот Bot = bot; Rocksmith = rocksmith; // Настройки приложения JObject settings = JsonCommon.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "settings.json")); contentProviders = new List <ContentProvider>(); Broadcast = new Broadcast(); JToken streamingConfigs = settings["streaming"]; if (!streamingConfigs.IsNullOrEmpty()) { if (!streamingConfigs["twitch"].IsNullOrEmpty()) { Twitch = new TwitchConnector(Bot, JsonConvert.DeserializeObject <TwitchConnectorConfig>(streamingConfigs["twitch"].ToString())); } if (!streamingConfigs["youtube"].IsNullOrEmpty()) { Youtube = new YoutubeConnector(Bot, JsonConvert.DeserializeObject <YoutubeConnectorConfig>(streamingConfigs["youtube"].ToString())); } } InitProviders((JObject)settings["providers"]); InitWidgetsSchemes(settings["scheme"].ToString()); InitBroadcastHandlers(); }
public BasicWhisperConnection(TwitchConnector connector, IrcConnection connection, MessageBus bus) { Verify.NotNull(connector, "connector"); Verify.NotNull(connection, "connection"); Verify.NotNull(bus, "bus"); Connector = connector; Connection = connection; Connection.ResponseReceived += Connection_ResponseReceived; Bus = bus; }
public BasicChannel(TwitchConnector connector, IrcConnection connection, MessageBus bus, string channelName) { Verify.NotNull(connector, "connector"); Verify.NotNull(connection, "connection"); Verify.NotNull(bus, "bus"); Verify.ChannelName(channelName, "channelName"); ActiveUsers = new ReadOnlyCollection<User>(_activeUsers); Connector = connector; Connector.Decoder.ChatReceived += Decoder_ChatReceived; Connector.Decoder.UserJoinedChannel += Decoder_UserJoinedChannel; Connector.Decoder.UserLefthannel += Decoder_UserLefthannel; Connection = connection; Name = channelName; Bus = bus; }
public static void Whisper(this User user, TwitchConnector connector, string message) { Verify.NotNull(connector, "connector"); Whisper(user, connector.WhisperServer, message); }
public BasicProtocolDecoder(TwitchConnector connector) { Verify.NotNull(connector, "connector"); Connector = connector; }