Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ac7771b0f5
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (43 sloc) 1.155 kb
using System;
using System.Net;
namespace SignalR.Hosting.Self
{
internal class CookieCollectionWrapper : IRequestCookieCollection
{
private CookieCollection _cookies;
private readonly Func<CookieCollection> _clearer;
public CookieCollectionWrapper(CookieCollection cookies)
: this (cookies, null)
{
}
public CookieCollectionWrapper(CookieCollection cookies, Func<CookieCollection> clearer)
{
_cookies = cookies;
_clearer = clearer;
}
public Cookie this[string name]
{
get
{
return ToSignalRCookie(_cookies[name]);
}
}
public int Count
{
get { return _cookies.Count; }
}
private static Cookie ToSignalRCookie(System.Net.Cookie source)
{
if (source == null)
{
return null;
}
return new Cookie(
source.Name,
source.Value,
source.Domain,
source.Path
);
}
}
}
Jump to Line
Something went wrong with that request. Please try again.