Пример #1
0
        private void Init(EmsWriterQueue queue, ICommand2MessageTranslator translator, string commandName)
        {
            ErrorTrap.AddAssertion(queue != null, "EmsWriterQueue queue can't be null for the" + this.GetType().FullName + ". Please correct the configuration and restart.");

            ErrorTrap.AddAssertion(translator != null, "ICommand2MessageTranslator translator can't be null. Please correct the configuration for " + this.GetType().FullName + " and restart.");


            ErrorTrap.AddAssertion(!String.IsNullOrEmpty(commandName), "commandName can't be null or empty. Please correct the configuration for " + this.GetType().FullName + " and restart.");

            ErrorTrap.RaiseTrappedErrors<ConfigurationErrorsException>();

            this.queue = queue;
            this.translator = translator;
            this.commandName = commandName;
        }
Пример #2
0
 public CommandExecutor(EmsWriterQueue queue, ICommand2MessageTranslator translator, string commandName)
 {
     Init(queue, translator, commandName);
 }