コード例 #1
0
        public static MessageConfiguration GetMessageConfiguration(string messageType)
        {
            MessageConfiguration messageConfigurationRet = defaultMessageConfiguration;

            if (IsMessageTypeAlreadyRegistered(messageType))
            {
                messageTypesBag.TryGetValue(messageType, out messageConfigurationRet);
            }

            return(messageConfigurationRet);
        }
コード例 #2
0
        public static bool RegisterMessageType(string messageType, MessageConfiguration messageConfiguration)
        {
            bool bRet = false;

            if (!IsMessageTypeAlreadyRegistered(messageType))
            {
                messageTypesBag.TryAdd(messageType, messageConfiguration);
                bRet = true;
            }

            return(bRet);
        }