+2001-08-16 Bob Smith <bob@thestuff.net>
+
+ * HttpCookieCollection.cs, HttpCookie.cs: Bug fixes.
+
2001-08-09 Bob Smith <bob@thestuff.net>
* BeginEventHandler.cs: Implemented.
// (C) Bob Smith
//
+using System;
+using System.Collections.Specialized;
+
namespace System.Web
{
public sealed class HttpCookie
}
}
public bool HasKeys
+ {
get
{
- return FALSE; //TODO
+ return false; //TODO
}
}
- public string this[string key] {get; set;} //TODO: get subcookie.
+ public string this[string key]
+ {
+//TODO: get/set subcookie.
+ get {return "";}
+ set {}
+ }
public string Name
{
get
_value = value;
}
}
- public NameValueCollection Values {get;} //TODO
+ public NameValueCollection Values
+ {
+//TODO
+ get {return null;}
+ }
}
}
// (C) Bob Smith
//
+using System;
+using System.Collections.Specialized;
+
namespace System.Web
{
public sealed class HttpCookieCollection : NameObjectCollectionBase
{
- public HttpCookieCollection();
+ public HttpCookieCollection() {}
public string[] AllKeys
{
get
{
get
{
- return this.BaseGet(index);
+ return (HttpCookie)(this.BaseGet(index));
}
}
public HttpCookie this[string name]
{
get
{
- return this.BaseGet(name);
+ return (HttpCookie)(this.BaseGet(name));
}
}
public void Add(HttpCookie cookie)
{
- this.BaseAdd(cookie.name, cookie);
+ this.BaseAdd(cookie.Name, cookie);
}
- public void Clear;
+ public void Clear()
{
- this.BaseClear;
+ this.BaseClear();
}
public void CopyTo(Array dest, int index)
{
+ int i;
+ HttpCookie cookie;
for(i=0; i<this.Count; i++)
{
- dest[index+i]=this[i];
+ cookie=this[i];
+ dest.SetValue(new HttpCookie(cookie.Name, cookie.Value), index+i);
}
}
public string GetKey(int index)
}
public void Set(HttpCookie cookie)
{
- this.BaseSet(cookie.name, cookie);
+ this.BaseSet(cookie.Name, cookie);
}
}
}