Example #1
0
        public void SetAccessLog(bool isEnabled, IAccessLog accessLog = null)
        {
            AccessLogEnabled = isEnabled;

            if (accessLog != null)
            {
                AccessLog = accessLog;
            }
        }
Example #2
0
        internal Service(INetworkConnectionFactory factory, ICoreSettings settings, IAccessLog accessLog)
        {
            Contract.Requires( factory != null );
            Contract.Requires(settings!=null);
            Contract.Requires(accessLog!=null);

            _accessLog = accessLog;
            _factory = factory;
            _settings = settings;
        }
Example #3
0
        public HttpFilter(IFilterCollections filterCollections, IAccessLog accessLog, ICoreSettings settings)
        {
            Contract.Requires(filterCollections!=null);
            Contract.Requires(accessLog!=null);
            Contract.Requires(settings!=null);

            _settings = settings;
            _filterCollections = filterCollections;
            _accessLog = accessLog;
        }
 public LogService(ILogger <LogService> logger,
                   IAccessLog accessLog,
                   IAccessLogParser accessLogParser,
                   SquidLogContext dbContext)
 {
     _logger          = logger;
     _accessLog       = accessLog;
     _accessLogParser = accessLogParser;
     _dbContext       = dbContext;
 }
        public HttpResponseFilter(IHttpRequest request, string connectionId, IAccessLog accessLog, IFilterCollections collections)
        {
            Contract.Requires(request!=null);
            Contract.Requires(!string.IsNullOrEmpty(connectionId));
            Contract.Requires(accessLog!=null);
            Contract.Requires(collections!=null);

            _request = request;
            _clientConnectionId = connectionId;
            _accessLog = accessLog;
            _filterCollections = collections;
        }
Example #6
0
        public ClientSession( IServerDispatcher dispatcher, INetworkFacadeFactory facadeFactory, IAccessLog accessLog )
        {
            Contract.Requires( dispatcher != null );
            Contract.Requires( facadeFactory != null );
            Contract.Requires( accessLog != null );

            ServiceLog.Logger.Verbose( "{0} ClientSession -- constructor", Id );

            _facadeFactory = facadeFactory;
            _accessLog = accessLog;

            //_sendingDataToClientLock = new ManualResetEvent(true);
            _id = Guid.NewGuid().ToString();
            _dispatcher = dispatcher;
            _dispatcher.SessionId = Id;
            _dispatcher.FatalErrorOccurred += _dispatcher_FatalErrorOccurred;
            _dispatcher.PartialDataAvailable += _dispatcher_PartialDataAvailable;
            _dispatcher.ReadResponseHeaderComplete += _dispatcher_ReadResponseHeaderComplete;
            _dispatcher.AllServersInactive += _dispatcher_AllServersInactive;
            _dispatcher.EmptyPipeline += _dispatcher_EmptyPipeline;
        }
Example #7
0
 public void SetAccessLogObject(IAccessLog accessLog)
 {
     AccessLog = accessLog;
 }
Example #8
0
 public void SetUp()
 {
     _logsFile  = LogFileFixture.WriteLogs();
     _accessLog = new AccessLogFile(CreateLogger <AccessLogFile>(), _logsFile);
 }