Ejemplo n.º 1
0
        public FakeWcfAppenderService(IApplicationConfiguration configurationRepository)
        {
            var configuration = configurationRepository;

            if (configuration == null)
            {
                throw new ArgumentException("ConfigurationRepository");
            }

            Url = configurationRepository.GetWCFLoggingServiceURL();

            if (string.IsNullOrEmpty(Url))
            {
                throw new ArgumentException("WcfAppenderService URL");
            }

            CreateChannelToWcfService(Url);
        }
Ejemplo n.º 2
0
        public WcfAppenderService(IApplicationConfiguration configurationRepository, IMapper mapper)
        {
            if (mapper != null)
            {
                _mapper = mapper;
            }
            if (configurationRepository != null)
            {
                // var url = configurationRepository.GetConfigurationValue<string>("LoggingServiceURL");
                var url = configurationRepository.GetWCFLoggingServiceURL();

                if (string.IsNullOrEmpty(url))
                {
                    throw new ArgumentException("WcfAppenderService URL");
                }

                CreateChannelToWcfService(url);
            }
        }