private void Init(ResponseDataProvider dataCommand, IResponseStatusTranslator responseTranslator, EmsReaderQueue queue) { ErrorTrap.AddAssertion(dataCommand != null, "ResponseData dataCommand can't be null for the" + this.GetType().FullName + ". Please correct the configuration and restart."); ErrorTrap.AddAssertion(responseTranslator != null, "IResponseStatusTranslator responseTranslator can't be null. Please correct the configuration for " + this.GetType() + " and restart."); ErrorTrap.RaiseTrappedErrors<ConfigurationErrorsException>(); this.dataCommand = dataCommand; this.responseTranslator = responseTranslator; this.queue = queue; }
public ResponseProcessor(ResponseDataProvider dataCommand, IResponseStatusTranslator responseTranslator, EmsReaderQueue queue) { Init(dataCommand, responseTranslator, queue); }
public ResponseProcessor(string responseSPName, IResponseStatusTranslator responseTranslator, EmsReaderQueue queue) { Init(new ResponseDataProvider(responseSPName), responseTranslator, queue); }