Ejemplo n.º 1
0
        public ICommandTypesExtractor ResultTypesFrom<TService>() where TService : IServiceMap
        {

            foreach (var commandResultType in ServiceMapHelper.ExtractServiceCommandsResults(typeof(TService)))
            {
                if (!_commandResultTypes.Contains(commandResultType))
                {
                    _commandResultTypes.Add(commandResultType);
                }
            }

            return this;
        }
Ejemplo n.º 2
0
        public ICommandTypesExtractor ConsumersFrom<TService>() where TService : IServiceMap
        {
            foreach (var commandInfo in ServiceMapHelper.ExtractServiceCommands(typeof(TService)))
            {
                if (!_commandTypes.Contains(commandInfo.Type))
                {
                    _commandTypes.Add(commandInfo.Type);
                }
            }

            foreach (var eventInfo in ServiceMapHelper.ExtractServiceEvents(typeof(TService)))
            {
                if (!_eventTypes.Contains(eventInfo.Type))
                {
                    _eventTypes.Add(eventInfo.Type);
                }
            }

            return this;
        }