コード例 #1
0
        FizzChannel AddChannelInternal(TestChannelMeta channelMeta)
        {
            if (channelLoopup.ContainsKey(channelMeta.channelId))
            {
                return(null);
            }

            FizzChannel channel = new FizzChannel(channelMeta.channelId, channelMeta.channelName);

            Channels.Add(channel);
            channelLoopup.Add(channel.Id, channel);
            return(channel);
        }
コード例 #2
0
        public void AddChannel(TestChannelMeta channel)
        {
            if (channel == null)
            {
                return;
            }

            if (channelLoopup.ContainsKey(channel.channelId))
            {
                return;
            }

            FizzChannel fizzChannel = AddChannelInternal(channel);

            if (IsConnected)
            {
                fizzChannel.SubscribeAndQuery();
            }
        }