internal HttpListenerWebSocketContext(
Uri requestUri,
NameValueCollection headers,
CookieCollection cookieCollection,
IPrincipal user,
bool isAuthenticated,
bool isLocal,
bool isSecureConnection,
string origin,
IEnumerable<string> secWebSocketProtocols,
string secWebSocketVersion,
string secWebSocketKey,
WebSocket webSocket)
{
Debug.Assert(requestUri != null, "requestUri shouldn't be null");
Debug.Assert(headers != null, "headers shouldn't be null");
Debug.Assert(cookieCollection != null, "cookieCollection shouldn't be null");
Debug.Assert(secWebSocketProtocols != null, "secWebSocketProtocols shouldn't be null");
Debug.Assert(webSocket != null, "webSocket shouldn't be null");
_cookieCollection = new CookieCollection();
_cookieCollection.Add(cookieCollection);
_headers = new NameValueCollection(headers);
_user = CopyPrincipal(user);
_requestUri = requestUri;
_isAuthenticated = isAuthenticated;
_isLocal = isLocal;
_isSecureConnection = isSecureConnection;
_origin = origin;
_secWebSocketProtocols = secWebSocketProtocols;
_secWebSocketVersion = secWebSocketVersion;
_secWebSocketKey = secWebSocketKey;
_webSocket = webSocket;
}