add all
This commit is contained in:
108
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/CollectionUtilities.cs
vendored
Normal file
108
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/CollectionUtilities.cs
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
public abstract class CollectionUtilities
|
||||
{
|
||||
public static void CollectMatches<T>(ICollection<T> matches, ISelector<T> selector,
|
||||
IEnumerable<IStore<T>> stores)
|
||||
{
|
||||
if (matches == null)
|
||||
throw new ArgumentNullException(nameof(matches));
|
||||
if (stores == null)
|
||||
return;
|
||||
|
||||
foreach (var store in stores)
|
||||
{
|
||||
if (store == null)
|
||||
continue;
|
||||
|
||||
foreach (T match in store.EnumerateMatches(selector))
|
||||
{
|
||||
matches.Add(match);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static IStore<T> CreateStore<T>(IEnumerable<T> contents)
|
||||
{
|
||||
return new StoreImpl<T>(contents);
|
||||
}
|
||||
|
||||
public static T GetValueOrKey<T>(IDictionary<T, T> d, T k)
|
||||
{
|
||||
return d.TryGetValue(k, out var v) ? v : k;
|
||||
}
|
||||
|
||||
public static V GetValueOrNull<K, V>(IDictionary<K, V> d, K k)
|
||||
where V : class
|
||||
{
|
||||
return d.TryGetValue(k, out var v) ? v : null;
|
||||
}
|
||||
|
||||
public static IEnumerable<T> Proxy<T>(IEnumerable<T> e)
|
||||
{
|
||||
return new EnumerableProxy<T>(e);
|
||||
}
|
||||
|
||||
public static ICollection<T> ReadOnly<T>(ICollection<T> c)
|
||||
{
|
||||
return new ReadOnlyCollectionProxy<T>(c);
|
||||
}
|
||||
|
||||
public static IDictionary<K, V> ReadOnly<K, V>(IDictionary<K, V> d)
|
||||
{
|
||||
return new ReadOnlyDictionaryProxy<K, V>(d);
|
||||
}
|
||||
|
||||
public static IList<T> ReadOnly<T>(IList<T> l)
|
||||
{
|
||||
return new ReadOnlyListProxy<T>(l);
|
||||
}
|
||||
|
||||
public static ISet<T> ReadOnly<T>(ISet<T> s)
|
||||
{
|
||||
return new ReadOnlySetProxy<T>(s);
|
||||
}
|
||||
|
||||
public static bool Remove<K, V>(IDictionary<K, V> d, K k, out V v)
|
||||
{
|
||||
if (!d.TryGetValue(k, out v))
|
||||
return false;
|
||||
|
||||
d.Remove(k);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static T RequireNext<T>(IEnumerator<T> e)
|
||||
{
|
||||
if (!e.MoveNext())
|
||||
throw new InvalidOperationException();
|
||||
|
||||
return e.Current;
|
||||
}
|
||||
|
||||
public static string ToString<T>(IEnumerable<T> c)
|
||||
{
|
||||
IEnumerator<T> e = c.GetEnumerator();
|
||||
if (!e.MoveNext())
|
||||
return "[]";
|
||||
|
||||
StringBuilder sb = new StringBuilder("[");
|
||||
sb.Append(e.Current);
|
||||
while (e.MoveNext())
|
||||
{
|
||||
sb.Append(", ");
|
||||
sb.Append(e.Current);
|
||||
}
|
||||
sb.Append(']');
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdc28a5ad8d0b3340b3b5641556474fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/EnumerableProxy.cs
vendored
Normal file
33
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/EnumerableProxy.cs
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal sealed class EnumerableProxy<T>
|
||||
: IEnumerable<T>
|
||||
{
|
||||
private readonly IEnumerable<T> m_target;
|
||||
|
||||
internal EnumerableProxy(IEnumerable<T> target)
|
||||
{
|
||||
if (target == null)
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return m_target.GetEnumerator();
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return m_target.GetEnumerator();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 571715e05129dc34383c126d51098c1c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs
vendored
Normal file
3
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab7586b2044df0e44a4c910e8d03f93c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs
vendored
Normal file
20
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
/// <summary>Interface for matching objects in an <see cref="IStore{T}"/>.</summary>
|
||||
/// <typeparam name="T">The contravariant type of selectable objects.</typeparam>
|
||||
public interface ISelector<in T>
|
||||
: ICloneable
|
||||
{
|
||||
/// <summary>Match the passed in object, returning true if it would be selected by this selector, false
|
||||
/// otherwise.</summary>
|
||||
/// <param name="candidate">The object to be matched.</param>
|
||||
/// <returns><code>true</code> if the objects is matched by this selector, false otherwise.</returns>
|
||||
bool Match(T candidate);
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e0266c79007451459497d3ba691a08b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs
vendored
Normal file
19
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
/// <summary>A generic interface describing a simple store of objects.</summary>
|
||||
/// <typeparam name="T">The covariant type of stored objects.</typeparam>
|
||||
public interface IStore<out T>
|
||||
{
|
||||
/// <summary>Enumerate the (possibly empty) collection of objects matched by the given selector.</summary>
|
||||
/// <param name="selector">The <see cref="ISelector{T}"/> used to select matching objects.</param>
|
||||
/// <returns>An <see cref="IEnumerable{T}"/> of the matching objects.</returns>
|
||||
IEnumerable<T> EnumerateMatches(ISelector<T> selector);
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7dea964c98f2454ba958564aafab2b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3845dc04ef8b2bc449341e49d7fada35
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal abstract class ReadOnlyCollection<T>
|
||||
: ICollection<T>
|
||||
{
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
public void Add(T item) => throw new NotSupportedException();
|
||||
public void Clear() => throw new NotSupportedException();
|
||||
public bool Remove(T item) => throw new NotSupportedException();
|
||||
|
||||
public abstract bool Contains(T item);
|
||||
public abstract int Count { get; }
|
||||
public abstract void CopyTo(T[] array, int arrayIndex);
|
||||
public abstract IEnumerator<T> GetEnumerator();
|
||||
}
|
||||
|
||||
internal class ReadOnlyCollectionProxy<T>
|
||||
: ReadOnlyCollection<T>
|
||||
{
|
||||
private readonly ICollection<T> m_target;
|
||||
|
||||
internal ReadOnlyCollectionProxy(ICollection<T> target)
|
||||
{
|
||||
if (target == null)
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
public override bool Contains(T item) => m_target.Contains(item);
|
||||
public override int Count => m_target.Count;
|
||||
public override void CopyTo(T[] array, int arrayIndex) => m_target.CopyTo(array, arrayIndex);
|
||||
public override IEnumerator<T> GetEnumerator() => m_target.GetEnumerator();
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 323bad9db03db12468df5318685d10c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal abstract class ReadOnlyDictionary<K, V>
|
||||
: IDictionary<K, V>
|
||||
{
|
||||
public V this[K key]
|
||||
{
|
||||
get { return Lookup(key); }
|
||||
set { throw new NotSupportedException(); }
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
public void Add(K key, V value) => throw new NotSupportedException();
|
||||
public void Add(KeyValuePair<K, V> item) => throw new NotSupportedException();
|
||||
public void Clear() => throw new NotSupportedException();
|
||||
public bool Remove(K key) => throw new NotSupportedException();
|
||||
public bool Remove(KeyValuePair<K, V> item) => throw new NotSupportedException();
|
||||
|
||||
public abstract bool Contains(KeyValuePair<K, V> item);
|
||||
public abstract bool ContainsKey(K key);
|
||||
public abstract void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex);
|
||||
public abstract int Count { get; }
|
||||
public abstract IEnumerator<KeyValuePair<K, V>> GetEnumerator();
|
||||
public abstract ICollection<K> Keys { get; }
|
||||
public abstract bool TryGetValue(K key, out V value);
|
||||
public abstract ICollection<V> Values { get; }
|
||||
|
||||
protected abstract V Lookup(K key);
|
||||
}
|
||||
|
||||
internal class ReadOnlyDictionaryProxy<K, V>
|
||||
: ReadOnlyDictionary<K, V>
|
||||
{
|
||||
private readonly IDictionary<K, V> m_target;
|
||||
|
||||
internal ReadOnlyDictionaryProxy(IDictionary<K, V> target)
|
||||
{
|
||||
if (target == null)
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
public override bool Contains(KeyValuePair<K, V> item) => m_target.Contains(item);
|
||||
public override bool ContainsKey(K key) => m_target.ContainsKey(key);
|
||||
public override void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) => m_target.CopyTo(array, arrayIndex);
|
||||
public override int Count => m_target.Count;
|
||||
public override IEnumerator<KeyValuePair<K, V>> GetEnumerator() => m_target.GetEnumerator();
|
||||
public override ICollection<K> Keys => new ReadOnlyCollectionProxy<K>(m_target.Keys);
|
||||
public override bool TryGetValue(K key, out V value) => m_target.TryGetValue(key, out value);
|
||||
public override ICollection<V> Values => new ReadOnlyCollectionProxy<V>(m_target.Values);
|
||||
|
||||
protected override V Lookup(K key) => m_target[key];
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a38f68b5c929cf40a64b86399b5469a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyList.cs
vendored
Normal file
63
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyList.cs
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal abstract class ReadOnlyList<T>
|
||||
: IList<T>
|
||||
{
|
||||
public T this[int index]
|
||||
{
|
||||
get { return Lookup(index); }
|
||||
set { throw new NotSupportedException(); }
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
public void Add(T item) => throw new NotSupportedException();
|
||||
public void Clear() => throw new NotSupportedException();
|
||||
public void Insert(int index, T item) => throw new NotSupportedException();
|
||||
public bool Remove(T item) => throw new NotSupportedException();
|
||||
public void RemoveAt(int index) => throw new NotSupportedException();
|
||||
|
||||
|
||||
public abstract bool Contains(T item);
|
||||
public abstract void CopyTo(T[] array, int arrayIndex);
|
||||
public abstract int Count { get; }
|
||||
public abstract IEnumerator<T> GetEnumerator();
|
||||
public abstract int IndexOf(T item);
|
||||
|
||||
protected abstract T Lookup(int index);
|
||||
}
|
||||
|
||||
internal class ReadOnlyListProxy<T>
|
||||
: ReadOnlyList<T>
|
||||
{
|
||||
private readonly IList<T> m_target;
|
||||
|
||||
internal ReadOnlyListProxy(IList<T> target)
|
||||
{
|
||||
if (target == null)
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
public override int Count => m_target.Count;
|
||||
public override bool Contains(T item) => m_target.Contains(item);
|
||||
public override void CopyTo(T[] array, int arrayIndex) => m_target.CopyTo(array, arrayIndex);
|
||||
public override IEnumerator<T> GetEnumerator() => m_target.GetEnumerator();
|
||||
public override int IndexOf(T item) => m_target.IndexOf(item);
|
||||
|
||||
protected override T Lookup(int index) => m_target[index];
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42d34408073dcc34683b4bb9ab1f25a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
65
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlySet.cs
vendored
Normal file
65
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlySet.cs
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal abstract class ReadOnlySet<T>
|
||||
: ISet<T>
|
||||
{
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
void ICollection<T>.Add(T item) => throw new NotSupportedException();
|
||||
|
||||
public bool Add(T item) => throw new NotSupportedException();
|
||||
public void Clear() => throw new NotSupportedException();
|
||||
public void ExceptWith(IEnumerable<T> other) => throw new NotSupportedException();
|
||||
public void IntersectWith(IEnumerable<T> other) => throw new NotSupportedException();
|
||||
public bool Remove(T item) => throw new NotSupportedException();
|
||||
public bool SetEquals(IEnumerable<T> other) => throw new NotSupportedException();
|
||||
public void SymmetricExceptWith(IEnumerable<T> other) => throw new NotSupportedException();
|
||||
public void UnionWith(IEnumerable<T> other) => throw new NotSupportedException();
|
||||
|
||||
public abstract bool Contains(T item);
|
||||
public abstract void CopyTo(T[] array, int arrayIndex);
|
||||
public abstract int Count { get; }
|
||||
public abstract IEnumerator<T> GetEnumerator();
|
||||
public abstract bool IsProperSubsetOf(IEnumerable<T> other);
|
||||
public abstract bool IsProperSupersetOf(IEnumerable<T> other);
|
||||
public abstract bool IsSubsetOf(IEnumerable<T> other);
|
||||
public abstract bool IsSupersetOf(IEnumerable<T> other);
|
||||
public abstract bool Overlaps(IEnumerable<T> other);
|
||||
}
|
||||
|
||||
internal class ReadOnlySetProxy<T>
|
||||
: ReadOnlySet<T>
|
||||
{
|
||||
private readonly ISet<T> m_target;
|
||||
|
||||
internal ReadOnlySetProxy(ISet<T> target)
|
||||
{
|
||||
if (target == null)
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
|
||||
m_target = target;
|
||||
}
|
||||
|
||||
public override bool Contains(T item) => m_target.Contains(item);
|
||||
public override void CopyTo(T[] array, int arrayIndex) => m_target.CopyTo(array, arrayIndex);
|
||||
public override int Count => m_target.Count;
|
||||
public override IEnumerator<T> GetEnumerator() => m_target.GetEnumerator();
|
||||
public override bool IsProperSubsetOf(IEnumerable<T> other) => m_target.IsProperSubsetOf(other);
|
||||
public override bool IsProperSupersetOf(IEnumerable<T> other) => m_target.IsProperSupersetOf(other);
|
||||
public override bool IsSubsetOf(IEnumerable<T> other) => m_target.IsSubsetOf(other);
|
||||
public override bool IsSupersetOf(IEnumerable<T> other) => m_target.IsSupersetOf(other);
|
||||
public override bool Overlaps(IEnumerable<T> other) => m_target.Overlaps(other);
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c945a33b689ce264c83bad7b01b886e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
29
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs
vendored
Normal file
29
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
|
||||
{
|
||||
internal sealed class StoreImpl<T>
|
||||
: IStore<T>
|
||||
{
|
||||
private readonly List<T> m_contents;
|
||||
|
||||
internal StoreImpl(IEnumerable<T> e)
|
||||
{
|
||||
m_contents = new List<T>(e);
|
||||
}
|
||||
|
||||
IEnumerable<T> IStore<T>.EnumerateMatches(ISelector<T> selector)
|
||||
{
|
||||
foreach (T candidate in m_contents)
|
||||
{
|
||||
if (selector == null || selector.Match(candidate))
|
||||
yield return candidate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs.meta
vendored
Normal file
11
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 445cc24ffa98e4b4f8b052a751547980
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user