Ejemplo n.º 1
0
 public LoggingEncoder(LoggingEncoderFactory factory)
 {
     _factory      = factory;
     _innerEncoder = factory.InnerMessageFactory.Encoder;
     _contentType  = factory.MediaType;
     _settings     = factory.Settings;
     _handler      = factory.Settings.IsService ? (HandlerAbstract) new HandlerService(factory.Settings) : new HandlerClient(factory.Settings);
 }
Ejemplo n.º 2
0
        public LoggingEncoder(LoggingEncoderFactory factory)
        {
            _factory      = factory;
            _innerEncoder = factory.InnerMessageFactory.Encoder;
            _contentType  = factory.MediaType;
            _settings     = factory.Settings;

            if (factory.Settings.UseCustomHandler)
            {
                _handler = new HandlerCustom.HandlerCustom(_settings);
            }
            else
            {
                _handler = new HandlerDefault(_settings);
            }
        }