本文整理汇总了C#中System.Web.HttpCookieCollection.BaseGet方法的典型用法代码示例。如果您正苦于以下问题:C# HttpCookieCollection.BaseGet方法的具体用法?C# HttpCookieCollection.BaseGet怎么用?C# HttpCookieCollection.BaseGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.HttpCookieCollection
的用法示例。
在下文中一共展示了HttpCookieCollection.BaseGet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HttpCookieCollection
// This copy constructor is used by the granular request validation feature. The collections are mutable once
// created, but nobody should ever be mutating them, so it's ok for these to be out of [....]. Additionally,
// we don't copy _response since this should only ever be called for the request cookies.
internal HttpCookieCollection(HttpCookieCollection col)
: base(StringComparer.OrdinalIgnoreCase) {
// We explicitly don't copy validation-related fields, as we want the copy to "reset" validation state.
// Copy the file references from the original collection into this instance
for (int i = 0; i < col.Count; i++) {
ThrowIfMaxHttpCollectionKeysExceeded();
string key = col.BaseGetKey(i);
object value = col.BaseGet(i);
BaseAdd(key, value);
}
IsReadOnly = col.IsReadOnly;
}