Пример #1
0
        protected void AddChannelData(IChannelIdentity channelIdentity, ChannelData data)
        {
            string originalName = data.Name;
            int    suffixNumber = 0;

            while (ChannelNameExists(data.Name))
            {
                suffixNumber++;

                data.ChangeName(string.Format("{0} ({1})", originalName, suffixNumber));
            }

            if (this.channelData.ContainsKey(channelIdentity))
            {
                this.log.Warning("Channel id {0} already exists", channelIdentity);
            }

            this.channelData[channelIdentity] = data;
            //            this.channels.Add(channelIdentity);
        }