예제 #1
0
        /// <summary>
        /// assume now for one message type we have only one channel
        /// </summary>
        /// <param name="channelName"></param>
        /// <param name="m"></param>
        /// <param name="moduleName">For exception information if occured model conflicts</param>
        public void AssignMessageTypeToChannel(string channelName, TItemModel m, string moduleName)
        {
            int v;

            if (MessageChannels.TryGetValue(channelName, out v))
            {
                MessageChannel channel = MChannelsList[v];
                if (channel.AssignedMessageModel == null)
                {
                    channel.FirstModuleNameAssigned = moduleName;
                    channel.AssignedMessageType     = m.ItemTypeName;
                    channel.AssignedMessageModel    = m;
                    //if (!MessageTypes.ContainsKey(m.ItemTypeName))
                    MessageTypes.Add(m.ItemTypeName, v);
                }
            }
            else
            {
                throw new Exception("Error: assign message type model to channel: channel name " + channelName + "not exists");
            }
        }
예제 #2
0
 public NaiveMSfromGitParams(TItemModel tm) : base(tm.GetHolder())
 {
 }
예제 #3
0
 public TeamCityBSParams(TItemModel tm) : base(tm.GetHolder())
 {
 }