Beispiel #1
0
 /// <summary>
 /// Initialize class of BroadcastChannel.
 /// Internally done by <see cref="SmartGlass.SmartGlassClient"/>
 /// </summary>
 /// <param name="transport">ChannelMessage transport</param>
 internal BroadcastChannel(ChannelMessageTransport transport)
 {
     _baseTransport = transport;
     _transport     = new JsonMessageTransport <BroadcastBaseMessage>(
         _baseTransport, ChannelJsonSerializerSettings.GetBroadcastSettings());
     _transport.MessageReceived += OnMessageReceived;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SmartGlass.Channels.InputTVRemoteChannel"/> class.
 /// </summary>
 /// <param name="transport">Base transport.</param>
 internal InputTVRemoteChannel(ChannelMessageTransport transport)
 {
     if (msg_id_prefix == null)
     {
         msg_id_prefix = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 8);
     }
     _baseTransport              = transport;
     _transport                  = new JsonMessageTransport <JsonBaseMessage>(_baseTransport, ChannelJsonSerializerSettings.GetBroadcastSettings());
     _transport.MessageReceived += OnMessageReceived;
 }
 internal BroadcastChannel(ChannelMessageTransport transport)
 {
     _baseTransport              = transport;
     _transport                  = new JsonMessageTransport <BroadcastBaseMessage>(_baseTransport, new BroadcastMessageJsonConverter());
     _transport.MessageReceived += OnMessageReceived;
 }