Got at least one data fetching method working; turns out, we can't use a patched LogicStack to get the data

This commit is contained in:
2026-01-14 22:11:11 +01:00
parent 40a8431464
commit 3f7122d30a
350 changed files with 41444 additions and 119 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace EmbedIO.Net.Internal
{
/// <summary>
/// Represents a wrapper for <c>System.Net.CookieCollection</c>.
/// </summary>
/// <seealso cref="ICookieCollection" />
internal sealed class SystemCookieCollection : ICookieCollection
{
private readonly CookieCollection _collection;
/// <summary>
/// Initializes a new instance of the <see cref="SystemCookieCollection"/> class.
/// </summary>
/// <param name="collection">The cookie collection.</param>
public SystemCookieCollection(CookieCollection collection)
{
_collection = collection;
}
/// <inheritdoc />
public int Count => _collection.Count;
/// <inheritdoc />
public bool IsSynchronized => _collection.IsSynchronized;
/// <inheritdoc />
public object SyncRoot => _collection.SyncRoot;
/// <inheritdoc />
public Cookie? this[string name] => _collection[name];
/// <inheritdoc />
IEnumerator<Cookie> IEnumerable<Cookie>.GetEnumerator() => _collection.OfType<Cookie>().GetEnumerator();
/// <inheritdoc />
public IEnumerator GetEnumerator() => _collection.GetEnumerator();
/// <inheritdoc />
public void CopyTo(Array array, int index) => _collection.CopyTo(array, index);
/// <inheritdoc />
public void CopyTo(Cookie[] array, int index) => _collection.CopyTo(array, index);
/// <inheritdoc />
public void Add(Cookie cookie) => _collection.Add(cookie);
/// <inheritdoc />
public bool Contains(Cookie cookie) => _collection.OfType<Cookie>().Contains(cookie);
}
}