예제 #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);
        }
예제 #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);
            }
        }