/// <summary>
        ///     Initializes a new instance of the <see cref="SessionEventArgsBase" /> class.
        /// </summary>
        private protected SessionEventArgsBase(ProxyServer server, ProxyEndPoint endPoint,
                                               TcpClientConnection clientConnection, HttpClientStream clientStream, ConnectRequest?connectRequest, Request request, CancellationTokenSource cancellationTokenSource)
        {
            BufferPool    = server.BufferPool;
            ExceptionFunc = server.ExceptionFunc;
            TimeLine["Session Created"] = DateTime.Now;

            CancellationTokenSource = cancellationTokenSource;

            ClientConnection = clientConnection;
            ClientStream     = clientStream;
            HttpClient       = new HttpWebClient(connectRequest, request, new Lazy <int>(() => clientConnection.GetProcessId(endPoint)));
            LocalEndPoint    = endPoint;
            EnableWinAuth    = server.EnableWinAuth && isWindowsAuthenticationSupported;
        }