示例#1
0
        private IMessageConvention BuildConvention(Type type)
        {
            var convention = new MessageConvention(
                type,
                GetRoute(type),
                GetExchange(type),
                GetQueue(type));

            _conventionsStore.Add(type, convention);
            return(convention);
        }
示例#2
0
        public IMessageConvention Get(Type type)
        {
            var convention = _conventionsStore.Get(type);

            if (convention is not null)
            {
                return(convention);
            }

            convention = new MessageConvention(type, GetRoute(type), GetExchange(type), GetQueue(type));
            _conventionsStore.Add(type, convention);
            return(convention);
        }