First commit
This commit is contained in:
8
Packages/ZLinq.Unity/Runtime.meta
Normal file
8
Packages/ZLinq.Unity/Runtime.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d73a4bba9206aa4da45149e38ba2ff5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/External.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/External.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8779dfc80070d04097029c66298253a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/External/UnityCollections.meta
vendored
Normal file
8
Packages/ZLinq.Unity/Runtime/External/UnityCollections.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1318fb368be93d3438af62a7cafca0a2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
783
Packages/ZLinq.Unity/Runtime/External/UnityCollections/UnityCollectionsExtensions.cs
vendored
Normal file
783
Packages/ZLinq.Unity/Runtime/External/UnityCollections/UnityCollectionsExtensions.cs
vendored
Normal file
@@ -0,0 +1,783 @@
|
||||
#if ZLINQ_UNITY_COLLECTIONS_SUPPORT
|
||||
|
||||
#pragma warning disable CS9074
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using ZLinq.Internal;
|
||||
using ZLinq.Linq;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
public static class UnityCollectionsExtensions
|
||||
{
|
||||
public static ValueEnumerable<FromNativeList<T>, T> AsValueEnumerable<T>(this NativeList<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeQueue<T>, T> AsValueEnumerable<T>(this NativeQueue<T>.ReadOnly source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeHashSet<T>, T> AsValueEnumerable<T>(this NativeHashSet<T> source)
|
||||
where T : unmanaged, IEquatable<T>
|
||||
{
|
||||
return new(new(source.AsReadOnly()));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeHashSet<T>, T> AsValueEnumerable<T>(this NativeHashSet<T>.ReadOnly source)
|
||||
where T : unmanaged, IEquatable<T>
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeHashMap<TKey, TValue>, KVPair<TKey, TValue>> AsValueEnumerable<TKey, TValue>(this NativeHashMap<TKey, TValue> source)
|
||||
where TKey : unmanaged, IEquatable<TKey>
|
||||
where TValue : unmanaged
|
||||
{
|
||||
return new(new(source.AsReadOnly()));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeHashMap<TKey, TValue>, KVPair<TKey, TValue>> AsValueEnumerable<TKey, TValue>(this NativeHashMap<TKey, TValue>.ReadOnly source)
|
||||
where TKey : unmanaged, IEquatable<TKey>
|
||||
where TValue : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeText, Unicode.Rune> AsValueEnumerable(this NativeText source)
|
||||
{
|
||||
return new(new(source.AsReadOnly()));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeText, Unicode.Rune> AsValueEnumerable(this NativeText.ReadOnly source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedList32Bytes<T>, T> AsValueEnumerable<T>(this FixedList32Bytes<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedList64Bytes<T>, T> AsValueEnumerable<T>(this FixedList64Bytes<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedList128Bytes<T>, T> AsValueEnumerable<T>(this FixedList128Bytes<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedList512Bytes<T>, T> AsValueEnumerable<T>(this FixedList512Bytes<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedList4096Bytes<T>, T> AsValueEnumerable<T>(this FixedList4096Bytes<T> source)
|
||||
where T : unmanaged
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedString32Bytes, Unicode.Rune> AsValueEnumerable(this FixedString32Bytes source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedString64Bytes, Unicode.Rune> AsValueEnumerable(this FixedString64Bytes source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedString128Bytes, Unicode.Rune> AsValueEnumerable(this FixedString128Bytes source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedString512Bytes, Unicode.Rune> AsValueEnumerable(this FixedString512Bytes source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromFixedString4096Bytes, Unicode.Rune> AsValueEnumerable(this FixedString4096Bytes source)
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ZLinq.Linq
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromNativeList<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
NativeList<T> source;
|
||||
int index;
|
||||
|
||||
public FromNativeList(NativeList<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset)
|
||||
{
|
||||
if (EnumeratorHelper.TryGetSlice(new ReadOnlySpan<T>(source.GetUnsafePtr(), source.Length), offset, destination.Length, out var slice))
|
||||
{
|
||||
slice.CopyTo(destination);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = new ReadOnlySpan<T>(source.GetUnsafePtr(), source.Length);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromNativeQueue<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
NativeQueue<T>.ReadOnly source;
|
||||
NativeQueue<T>.Enumerator enumerator;
|
||||
|
||||
public FromNativeQueue(NativeQueue<T>.ReadOnly source)
|
||||
{
|
||||
this.source = source;
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromNativeHashSet<T> : IValueEnumerator<T>
|
||||
where T : unmanaged, IEquatable<T>
|
||||
{
|
||||
NativeHashSet<T>.ReadOnly source;
|
||||
NativeHashSet<T>.Enumerator enumerator;
|
||||
|
||||
public FromNativeHashSet(NativeHashSet<T>.ReadOnly source)
|
||||
{
|
||||
this.source = source;
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromNativeHashMap<TKey, TValue> : IValueEnumerator<KVPair<TKey, TValue>>
|
||||
where TKey : unmanaged, IEquatable<TKey>
|
||||
where TValue : unmanaged
|
||||
{
|
||||
NativeHashMap<TKey, TValue>.ReadOnly source;
|
||||
NativeHashMap<TKey, TValue>.Enumerator enumerator;
|
||||
|
||||
public FromNativeHashMap(NativeHashMap<TKey, TValue>.ReadOnly source)
|
||||
{
|
||||
this.source = source;
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<KVPair<TKey, TValue>> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out KVPair<TKey, TValue> current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<KVPair<TKey, TValue>> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromNativeText : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
NativeText.Enumerator enumerator;
|
||||
|
||||
public FromNativeText(NativeText.ReadOnly source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct FromFixedList32Bytes<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
FixedList32Bytes<T> source;
|
||||
int index;
|
||||
|
||||
public FromFixedList32Bytes(FixedList32Bytes<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct FromFixedList64Bytes<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
FixedList64Bytes<T> source;
|
||||
int index;
|
||||
|
||||
public FromFixedList64Bytes(FixedList64Bytes<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct FromFixedList128Bytes<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
FixedList128Bytes<T> source;
|
||||
int index;
|
||||
|
||||
public FromFixedList128Bytes(FixedList128Bytes<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct FromFixedList512Bytes<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
FixedList512Bytes<T> source;
|
||||
int index;
|
||||
|
||||
public FromFixedList512Bytes(FixedList512Bytes<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct FromFixedList4096Bytes<T> : IValueEnumerator<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
FixedList4096Bytes<T> source;
|
||||
int index;
|
||||
|
||||
public FromFixedList4096Bytes(FixedList4096Bytes<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromFixedString32Bytes : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
FixedString32Bytes.Enumerator enumerator;
|
||||
|
||||
public FromFixedString32Bytes(FixedString32Bytes source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromFixedString64Bytes : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
FixedString64Bytes.Enumerator enumerator;
|
||||
|
||||
public FromFixedString64Bytes(FixedString64Bytes source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromFixedString128Bytes : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
FixedString128Bytes.Enumerator enumerator;
|
||||
|
||||
public FromFixedString128Bytes(FixedString128Bytes source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromFixedString512Bytes : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
FixedString512Bytes.Enumerator enumerator;
|
||||
|
||||
public FromFixedString512Bytes(FixedString512Bytes source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public struct FromFixedString4096Bytes : IValueEnumerator<Unicode.Rune>
|
||||
{
|
||||
FixedString4096Bytes.Enumerator enumerator;
|
||||
|
||||
public FromFixedString4096Bytes(FixedString4096Bytes source)
|
||||
{
|
||||
this.enumerator = source.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<Unicode.Rune> destination, Index offset) => false;
|
||||
|
||||
public bool TryGetNext(out Unicode.Rune current)
|
||||
{
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
current = enumerator.Current;
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<Unicode.Rune> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore CS9074
|
||||
#endif
|
||||
11
Packages/ZLinq.Unity/Runtime/External/UnityCollections/UnityCollectionsExtensions.cs.meta
vendored
Normal file
11
Packages/ZLinq.Unity/Runtime/External/UnityCollections/UnityCollectionsExtensions.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9c42c82467624146b57ea3cd9602a24
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Packages/ZLinq.Unity/Runtime/External/UnityCollections/ZLinq.Unity.UnityCollections.asmdef
vendored
Normal file
24
Packages/ZLinq.Unity/Runtime/External/UnityCollections/ZLinq.Unity.UnityCollections.asmdef
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "ZLinq.Unity.UnityCollectoins",
|
||||
"rootNamespace": "ZLinq",
|
||||
"references": [
|
||||
"Unity.Collections"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"ZLinq.dll"
|
||||
],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.collections",
|
||||
"expression": "2.1.1",
|
||||
"define": "ZLINQ_UNITY_COLLECTIONS_SUPPORT"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd45bb705edc4cf47acd3a4ae20a9e23
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
248
Packages/ZLinq.Unity/Runtime/GameObjectTraverser.cs
Normal file
248
Packages/ZLinq.Unity/Runtime/GameObjectTraverser.cs
Normal file
@@ -0,0 +1,248 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using ZLinq.Traversables;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
public static class GameObjectTraverserExtensions
|
||||
{
|
||||
public static GameObjectTraverser AsTraverser(this GameObject origin) => new(origin);
|
||||
|
||||
// type inference helper
|
||||
|
||||
public static ValueEnumerable<Children<GameObjectTraverser, GameObject>, GameObject> Children(this GameObjectTraverser traverser) => traverser.Children<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<Children<GameObjectTraverser, GameObject>, GameObject> ChildrenAndSelf(this GameObjectTraverser traverser) => traverser.ChildrenAndSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<Descendants<GameObjectTraverser, GameObject>, GameObject> Descendants(this GameObjectTraverser traverser) => traverser.Descendants<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<Descendants<GameObjectTraverser, GameObject>, GameObject> DescendantsAndSelf(this GameObjectTraverser traverser) => traverser.DescendantsAndSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<Ancestors<GameObjectTraverser, GameObject>, GameObject> Ancestors(this GameObjectTraverser traverser) => traverser.Ancestors<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<Ancestors<GameObjectTraverser, GameObject>, GameObject> AncestorsAndSelf(this GameObjectTraverser traverser) => traverser.AncestorsAndSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<BeforeSelf<GameObjectTraverser, GameObject>, GameObject> BeforeSelf(this GameObjectTraverser traverser) => traverser.BeforeSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<BeforeSelf<GameObjectTraverser, GameObject>, GameObject> BeforeSelfAndSelf(this GameObjectTraverser traverser) => traverser.BeforeSelfAndSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<AfterSelf<GameObjectTraverser, GameObject>, GameObject> AfterSelf(this GameObjectTraverser traverser) => traverser.AfterSelf<GameObjectTraverser, GameObject>();
|
||||
public static ValueEnumerable<AfterSelf<GameObjectTraverser, GameObject>, GameObject> AfterSelfAndSelf(this GameObjectTraverser traverser) => traverser.AfterSelfAndSelf<GameObjectTraverser, GameObject>();
|
||||
|
||||
// direct shortcut
|
||||
|
||||
public static ValueEnumerable<Children<GameObjectTraverser, GameObject>, GameObject> Children(this GameObject origin) => origin.AsTraverser().Children();
|
||||
public static ValueEnumerable<Children<GameObjectTraverser, GameObject>, GameObject> ChildrenAndSelf(this GameObject origin) => origin.AsTraverser().ChildrenAndSelf();
|
||||
public static ValueEnumerable<Descendants<GameObjectTraverser, GameObject>, GameObject> Descendants(this GameObject origin) => origin.AsTraverser().Descendants();
|
||||
public static ValueEnumerable<Descendants<GameObjectTraverser, GameObject>, GameObject> DescendantsAndSelf(this GameObject origin) => origin.AsTraverser().DescendantsAndSelf();
|
||||
public static ValueEnumerable<Ancestors<GameObjectTraverser, GameObject>, GameObject> Ancestors(this GameObject origin) => origin.AsTraverser().Ancestors();
|
||||
public static ValueEnumerable<Ancestors<GameObjectTraverser, GameObject>, GameObject> AncestorsAndSelf(this GameObject origin) => origin.AsTraverser().AncestorsAndSelf();
|
||||
public static ValueEnumerable<BeforeSelf<GameObjectTraverser, GameObject>, GameObject> BeforeSelf(this GameObject origin) => origin.AsTraverser().BeforeSelf();
|
||||
public static ValueEnumerable<BeforeSelf<GameObjectTraverser, GameObject>, GameObject> BeforeSelfAndSelf(this GameObject origin) => origin.AsTraverser().BeforeSelfAndSelf();
|
||||
public static ValueEnumerable<AfterSelf<GameObjectTraverser, GameObject>, GameObject> AfterSelf(this GameObject origin) => origin.AsTraverser().AfterSelf();
|
||||
public static ValueEnumerable<AfterSelf<GameObjectTraverser, GameObject>, GameObject> AfterSelfAndSelf(this GameObject origin) => origin.AsTraverser().AfterSelfAndSelf();
|
||||
|
||||
// OfComponent
|
||||
|
||||
public static ValueEnumerable<OfComponentG<Children<GameObjectTraverser, GameObject>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Children<GameObjectTraverser, GameObject>, GameObject> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentG<Descendants<GameObjectTraverser, GameObject>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Descendants<GameObjectTraverser, GameObject>, GameObject> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentG<Ancestors<GameObjectTraverser, GameObject>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Ancestors<GameObjectTraverser, GameObject>, GameObject> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentG<BeforeSelf<GameObjectTraverser, GameObject>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<BeforeSelf<GameObjectTraverser, GameObject>, GameObject> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentG<AfterSelf<GameObjectTraverser, GameObject>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<AfterSelf<GameObjectTraverser, GameObject>, GameObject> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct GameObjectTraverser : ITraverser<GameObjectTraverser, GameObject>
|
||||
{
|
||||
static readonly object CalledTryGetNextChild = new object();
|
||||
static readonly object ParentNotFound = new object();
|
||||
|
||||
readonly GameObject gameObject;
|
||||
readonly Transform transform; // cache transform
|
||||
object? initializedState; // CalledTryGetNext or Parent(for sibling operations)
|
||||
int childCount; // self childCount(TryGetNextChild) or parent childCount(TryGetSibling)
|
||||
int index;
|
||||
|
||||
public GameObjectTraverser(GameObject origin)
|
||||
{
|
||||
this.gameObject = origin;
|
||||
this.transform = gameObject.transform;
|
||||
this.initializedState = null;
|
||||
this.childCount = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public GameObject Origin => gameObject;
|
||||
public GameObjectTraverser ConvertToTraverser(GameObject next) => new(next);
|
||||
|
||||
public bool TryGetParent(out GameObject parent)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp != null)
|
||||
{
|
||||
parent = tp.gameObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
parent = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetChildCount(out int count)
|
||||
{
|
||||
count = transform.childCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetHasChild(out bool hasChild)
|
||||
{
|
||||
hasChild = transform.childCount != 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetNextChild(out GameObject child)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
initializedState = CalledTryGetNextChild;
|
||||
childCount = transform.childCount;
|
||||
}
|
||||
|
||||
if (index < childCount)
|
||||
{
|
||||
child = transform.GetChild(index++).gameObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
child = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNextSibling(out GameObject next)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp == null)
|
||||
{
|
||||
var scene = transform.gameObject.scene;
|
||||
// check is scene root object
|
||||
if (scene.IsValid())
|
||||
{
|
||||
initializedState = scene;
|
||||
childCount = scene.rootCount;
|
||||
index = transform.GetSiblingIndex() + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// cache parent and childCount
|
||||
initializedState = tp;
|
||||
childCount = tp.childCount; // parent's childCount
|
||||
index = transform.GetSiblingIndex() + 1;
|
||||
}
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (initializedState is Transform parent)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
next = parent.GetChild(index++).gameObject;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (initializedState is UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
var list = UnityEngine.Pool.ListPool<GameObject>.Get();
|
||||
scene.GetRootGameObjects(list);
|
||||
next = list[index++];
|
||||
UnityEngine.Pool.ListPool<GameObject>.Release(list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetPreviousSibling(out GameObject previous)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp == null)
|
||||
{
|
||||
var scene = transform.gameObject.scene;
|
||||
// check is scene root object
|
||||
if (scene.IsValid())
|
||||
{
|
||||
initializedState = scene;
|
||||
childCount = transform.GetSiblingIndex();
|
||||
index = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = tp;
|
||||
childCount = transform.GetSiblingIndex(); // not childCount but means `to`
|
||||
index = 0; // 0 to siblingIndex
|
||||
}
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (initializedState is Transform parent)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
previous = parent.GetChild(index++).gameObject;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (initializedState is UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
var list = UnityEngine.Pool.ListPool<GameObject>.Get();
|
||||
scene.GetRootGameObjects(list);
|
||||
previous = list[index++];
|
||||
UnityEngine.Pool.ListPool<GameObject>.Release(list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Packages/ZLinq.Unity/Runtime/GameObjectTraverser.cs.meta
Normal file
11
Packages/ZLinq.Unity/Runtime/GameObjectTraverser.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7b9e09717ffc984e9c34ed6493db8a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
161
Packages/ZLinq.Unity/Runtime/NativeArrayExtensions.cs
Normal file
161
Packages/ZLinq.Unity/Runtime/NativeArrayExtensions.cs
Normal file
@@ -0,0 +1,161 @@
|
||||
#pragma warning disable CS9074
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
using ZLinq.Internal;
|
||||
using ZLinq.Linq;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
public static class NativeArrayExtensions
|
||||
{
|
||||
public static ValueEnumerable<FromNativeArray<T>, T> AsValueEnumerable<T>(this NativeArray<T> source)
|
||||
where T : struct
|
||||
{
|
||||
return new(new(source.AsReadOnly()));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeArray<T>, T> AsValueEnumerable<T>(this NativeArray<T>.ReadOnly source)
|
||||
where T : struct
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
|
||||
public static ValueEnumerable<FromNativeSlice<T>, T> AsValueEnumerable<T>(this NativeSlice<T> source)
|
||||
where T : struct
|
||||
{
|
||||
return new(new(source));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ZLinq.Linq
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct FromNativeArray<T> : IValueEnumerator<T>
|
||||
where T : struct
|
||||
{
|
||||
public FromNativeArray(NativeArray<T>.ReadOnly source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
NativeArray<T>.ReadOnly source;
|
||||
int index;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public bool TryCopyTo(Span<T> destination, Index offset)
|
||||
{
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
if (EnumeratorHelper.TryGetSlice<T>(source, offset, destination.Length, out var slice))
|
||||
{
|
||||
slice.CopyTo(destination);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
unsafe
|
||||
{
|
||||
if (EnumeratorHelper.TryGetSlice<T>(new ReadOnlySpan<T>(source.GetUnsafeReadOnlyPtr(), source.Length), offset, destination.Length, out var slice))
|
||||
{
|
||||
slice.CopyTo(destination);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
span = source;
|
||||
return true;
|
||||
#else
|
||||
unsafe
|
||||
{
|
||||
span = new ReadOnlySpan<T>(source.GetUnsafeReadOnlyPtr(), source.Length);
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct FromNativeSlice<T> : IValueEnumerator<T>
|
||||
where T : struct
|
||||
{
|
||||
NativeSlice<T> source;
|
||||
int index;
|
||||
|
||||
public FromNativeSlice(NativeSlice<T> source)
|
||||
{
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe bool TryCopyTo(Span<T> destination, Index offset)
|
||||
{
|
||||
if (EnumeratorHelper.TryGetSlice(new ReadOnlySpan<T>(source.GetUnsafePtr(), source.Length), offset, destination.Length, out var slice))
|
||||
{
|
||||
slice.CopyTo(destination);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNext(out T current)
|
||||
{
|
||||
if ((uint)index < (uint)source.Length)
|
||||
{
|
||||
current = source[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = source.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe bool TryGetSpan(out ReadOnlySpan<T> span)
|
||||
{
|
||||
span = new ReadOnlySpan<T>(source.GetUnsafePtr(), source.Length);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore CS9074
|
||||
11
Packages/ZLinq.Unity/Runtime/NativeArrayExtensions.cs.meta
Normal file
11
Packages/ZLinq.Unity/Runtime/NativeArrayExtensions.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35026e77d3aeba64f8b30ecd6e38f184
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
110
Packages/ZLinq.Unity/Runtime/OfComponent.cs
Normal file
110
Packages/ZLinq.Unity/Runtime/OfComponent.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct OfComponentT<TEnumerable, TComponent> : IValueEnumerator<TComponent>
|
||||
where TEnumerable : struct, IValueEnumerator<Transform>
|
||||
where TComponent : Component
|
||||
{
|
||||
TEnumerable source;
|
||||
|
||||
internal OfComponentT(TEnumerable source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetSpan(out ReadOnlySpan<TComponent> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNext(out TComponent current)
|
||||
{
|
||||
while (source.TryGetNext(out var value))
|
||||
{
|
||||
var component = value.GetComponent<TComponent>();
|
||||
if (component != null)
|
||||
{
|
||||
current = component;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
source.Dispose();
|
||||
}
|
||||
|
||||
public bool TryCopyTo(Span<TComponent> destination, Index offset)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct OfComponentG<TEnumerable, TComponent> : IValueEnumerator<TComponent>
|
||||
where TEnumerable : struct, IValueEnumerator<GameObject>
|
||||
where TComponent : Component
|
||||
{
|
||||
TEnumerable source;
|
||||
|
||||
internal OfComponentG(TEnumerable source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public bool TryGetNonEnumeratedCount(out int count)
|
||||
{
|
||||
count = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetSpan(out ReadOnlySpan<TComponent> span)
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNext(out TComponent current)
|
||||
{
|
||||
while (source.TryGetNext(out var value))
|
||||
{
|
||||
var component = value.GetComponent<TComponent>();
|
||||
if (component != null)
|
||||
{
|
||||
current = component;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
current = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
source.Dispose();
|
||||
}
|
||||
|
||||
public bool TryCopyTo(Span<TComponent> destination, Index offset)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Packages/ZLinq.Unity/Runtime/OfComponent.cs.meta
Normal file
11
Packages/ZLinq.Unity/Runtime/OfComponent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee3894e6d711f444b9a7e010477569ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54b5701e205c3534b92ec040b9da16af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins/net10.0.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins/net10.0.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0507c8a03b8325b4fb17b04e0abc22c8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.dll
vendored
Normal file
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.dll
vendored
Normal file
Binary file not shown.
49
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.dll.meta
vendored
Normal file
49
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.dll.meta
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aecf6d6cbdd3d84e9f71e77acdb0ee3
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 3
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
110
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.xml
vendored
Normal file
110
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.xml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ZLinq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Span{``1})">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
Returns the number of elements copied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Collections.Generic.List{``1})">
|
||||
<summary>
|
||||
List is cleared and then filled with the elements of the source. Destination size is list.Count.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.ToArrayPool``2(ZLinq.ValueEnumerable{``0,``1})">
|
||||
<summary>
|
||||
Converts to an array borrowed from ArrayPool<T>.Shared.
|
||||
For performance considerations, PooledArray is a struct, so
|
||||
copying or boxing it risks returning to the ArrayPool multiple times.
|
||||
Always use it simply with using and do not keep it for long periods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZLinq.PooledArray`1">
|
||||
<summary>
|
||||
Holds an array borrowed from ArrayPool<T>.Shared.Rent.
|
||||
When Disposed, it will Return the array to ArrayPool<T>.Shared.
|
||||
If boxed or passed by copy, there's a risk of multiple Returns.
|
||||
Please use it as is and avoid long-term retention.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNext(`0@)">
|
||||
<summary>
|
||||
Equivalent of IEnumerator.MoveNext + Current.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNonEnumeratedCount(System.Int32@)">
|
||||
<summary>
|
||||
Returns the length when processing time is not necessary.
|
||||
Always returns true if TryGetSpan or TryCopyTo returns true.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetSpan(System.ReadOnlySpan{`0}@)">
|
||||
<summary>
|
||||
Returns true if it can return a Span.
|
||||
Used for SIMD and loop processing optimization.
|
||||
If copying the entire value is acceptable, prioritize TryGetNonEnumeratedCount -> TryCopyTo instead.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryCopyTo(System.Span{`0},System.Index)">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
This serves as a TryGet function as well, e.g. single-span and ^1 is TryGetLast.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DropInGenerateTypes">
|
||||
<summary>
|
||||
Gets the types of collections for which LINQ implementations should be generated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.ConditionalCompilationSymbols">
|
||||
<summary>
|
||||
Gets or sets the conditional compilation symbols to wrap the generated code with #if directives.
|
||||
If specified, the generated code will be wrapped in #if/#endif directives using these symbols.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DisableEmitSource">
|
||||
<summary>
|
||||
Gets or sets whether to disable source generation in emitted code.
|
||||
When true, the source code comments will not be included in the generated code.
|
||||
When false (default), source code comments will be included in the generated code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ZLinqDropInAttribute.#ctor(System.String,ZLinq.DropInGenerateTypes)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:ZLinq.ZLinqDropInAttribute"/> class.
|
||||
</summary>
|
||||
<param name="generateNamespace">The namespace where the generated LINQ implementations will be placed. If empty, place to global.</param>
|
||||
<param name="dropInGenerateTypes">The types of collections for which LINQ implementations should be generated.</param>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
7
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.xml.meta
vendored
Normal file
7
Packages/ZLinq.Unity/Runtime/Plugins/net10.0/ZLinq.xml.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a51b392d39f260b47838faf4c1b7deb5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins/net8.0.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins/net8.0.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23e0b4015072efc42b0c43f706109d82
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.dll
vendored
Normal file
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.dll
vendored
Normal file
Binary file not shown.
49
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.dll.meta
vendored
Normal file
49
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.dll.meta
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dd85473e7e8ad64285831ce8ed0b7c2
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 3
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
110
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.xml
vendored
Normal file
110
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.xml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ZLinq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Span{``1})">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
Returns the number of elements copied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Collections.Generic.List{``1})">
|
||||
<summary>
|
||||
List is cleared and then filled with the elements of the source. Destination size is list.Count.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.ToArrayPool``2(ZLinq.ValueEnumerable{``0,``1})">
|
||||
<summary>
|
||||
Converts to an array borrowed from ArrayPool<T>.Shared.
|
||||
For performance considerations, PooledArray is a struct, so
|
||||
copying or boxing it risks returning to the ArrayPool multiple times.
|
||||
Always use it simply with using and do not keep it for long periods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZLinq.PooledArray`1">
|
||||
<summary>
|
||||
Holds an array borrowed from ArrayPool<T>.Shared.Rent.
|
||||
When Disposed, it will Return the array to ArrayPool<T>.Shared.
|
||||
If boxed or passed by copy, there's a risk of multiple Returns.
|
||||
Please use it as is and avoid long-term retention.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNext(`0@)">
|
||||
<summary>
|
||||
Equivalent of IEnumerator.MoveNext + Current.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNonEnumeratedCount(System.Int32@)">
|
||||
<summary>
|
||||
Returns the length when processing time is not necessary.
|
||||
Always returns true if TryGetSpan or TryCopyTo returns true.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetSpan(System.ReadOnlySpan{`0}@)">
|
||||
<summary>
|
||||
Returns true if it can return a Span.
|
||||
Used for SIMD and loop processing optimization.
|
||||
If copying the entire value is acceptable, prioritize TryGetNonEnumeratedCount -> TryCopyTo instead.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryCopyTo(System.Span{`0},System.Index)">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
This serves as a TryGet function as well, e.g. single-span and ^1 is TryGetLast.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DropInGenerateTypes">
|
||||
<summary>
|
||||
Gets the types of collections for which LINQ implementations should be generated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.ConditionalCompilationSymbols">
|
||||
<summary>
|
||||
Gets or sets the conditional compilation symbols to wrap the generated code with #if directives.
|
||||
If specified, the generated code will be wrapped in #if/#endif directives using these symbols.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DisableEmitSource">
|
||||
<summary>
|
||||
Gets or sets whether to disable source generation in emitted code.
|
||||
When true, the source code comments will not be included in the generated code.
|
||||
When false (default), source code comments will be included in the generated code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ZLinqDropInAttribute.#ctor(System.String,ZLinq.DropInGenerateTypes)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:ZLinq.ZLinqDropInAttribute"/> class.
|
||||
</summary>
|
||||
<param name="generateNamespace">The namespace where the generated LINQ implementations will be placed. If empty, place to global.</param>
|
||||
<param name="dropInGenerateTypes">The types of collections for which LINQ implementations should be generated.</param>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
7
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.xml.meta
vendored
Normal file
7
Packages/ZLinq.Unity/Runtime/Plugins/net8.0/ZLinq.xml.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbbb8995ef7d07e4f8481b4e723bbaff
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins/net9.0.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins/net9.0.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 376a4bea30efe974bb5718aec77fd1c7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.dll
vendored
Normal file
BIN
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.dll
vendored
Normal file
Binary file not shown.
49
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.dll.meta
vendored
Normal file
49
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.dll.meta
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9068534393c548742b51dbb1b5d1bdec
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 3
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
110
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.xml
vendored
Normal file
110
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.xml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ZLinq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Span{``1})">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
Returns the number of elements copied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Collections.Generic.List{``1})">
|
||||
<summary>
|
||||
List is cleared and then filled with the elements of the source. Destination size is list.Count.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.ToArrayPool``2(ZLinq.ValueEnumerable{``0,``1})">
|
||||
<summary>
|
||||
Converts to an array borrowed from ArrayPool<T>.Shared.
|
||||
For performance considerations, PooledArray is a struct, so
|
||||
copying or boxing it risks returning to the ArrayPool multiple times.
|
||||
Always use it simply with using and do not keep it for long periods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZLinq.PooledArray`1">
|
||||
<summary>
|
||||
Holds an array borrowed from ArrayPool<T>.Shared.Rent.
|
||||
When Disposed, it will Return the array to ArrayPool<T>.Shared.
|
||||
If boxed or passed by copy, there's a risk of multiple Returns.
|
||||
Please use it as is and avoid long-term retention.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNext(`0@)">
|
||||
<summary>
|
||||
Equivalent of IEnumerator.MoveNext + Current.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNonEnumeratedCount(System.Int32@)">
|
||||
<summary>
|
||||
Returns the length when processing time is not necessary.
|
||||
Always returns true if TryGetSpan or TryCopyTo returns true.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetSpan(System.ReadOnlySpan{`0}@)">
|
||||
<summary>
|
||||
Returns true if it can return a Span.
|
||||
Used for SIMD and loop processing optimization.
|
||||
If copying the entire value is acceptable, prioritize TryGetNonEnumeratedCount -> TryCopyTo instead.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryCopyTo(System.Span{`0},System.Index)">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
This serves as a TryGet function as well, e.g. single-span and ^1 is TryGetLast.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DropInGenerateTypes">
|
||||
<summary>
|
||||
Gets the types of collections for which LINQ implementations should be generated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.ConditionalCompilationSymbols">
|
||||
<summary>
|
||||
Gets or sets the conditional compilation symbols to wrap the generated code with #if directives.
|
||||
If specified, the generated code will be wrapped in #if/#endif directives using these symbols.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DisableEmitSource">
|
||||
<summary>
|
||||
Gets or sets whether to disable source generation in emitted code.
|
||||
When true, the source code comments will not be included in the generated code.
|
||||
When false (default), source code comments will be included in the generated code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ZLinqDropInAttribute.#ctor(System.String,ZLinq.DropInGenerateTypes)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:ZLinq.ZLinqDropInAttribute"/> class.
|
||||
</summary>
|
||||
<param name="generateNamespace">The namespace where the generated LINQ implementations will be placed. If empty, place to global.</param>
|
||||
<param name="dropInGenerateTypes">The types of collections for which LINQ implementations should be generated.</param>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
7
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.xml.meta
vendored
Normal file
7
Packages/ZLinq.Unity/Runtime/Plugins/net9.0/ZLinq.xml.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 706f266cc51bbf94e82403eb02e79a37
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4968ccf14414e0469f83161e59648af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.dll
vendored
Normal file
BIN
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.dll
vendored
Normal file
Binary file not shown.
57
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.dll.meta
vendored
Normal file
57
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.dll.meta
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf90099a8f165094da8b17bd2626a2b8
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 3
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
AndroidLibraryDependee: UnityLibrary
|
||||
AndroidSharedLibraryType: Executable
|
||||
CPU: ARMv7
|
||||
Any:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
598
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.xml
vendored
Normal file
598
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.xml
vendored
Normal file
@@ -0,0 +1,598 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ZLinq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Span{``1})">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
Returns the number of elements copied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Collections.Generic.List{``1})">
|
||||
<summary>
|
||||
List is cleared and then filled with the elements of the source. Destination size is list.Count.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.ToArrayPool``2(ZLinq.ValueEnumerable{``0,``1})">
|
||||
<summary>
|
||||
Converts to an array borrowed from ArrayPool<T>.Shared.
|
||||
For performance considerations, PooledArray is a struct, so
|
||||
copying or boxing it risks returning to the ArrayPool multiple times.
|
||||
Always use it simply with using and do not keep it for long periods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZLinq.PooledArray`1">
|
||||
<summary>
|
||||
Holds an array borrowed from ArrayPool<T>.Shared.Rent.
|
||||
When Disposed, it will Return the array to ArrayPool<T>.Shared.
|
||||
If boxed or passed by copy, there's a risk of multiple Returns.
|
||||
Please use it as is and avoid long-term retention.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNext(`0@)">
|
||||
<summary>
|
||||
Equivalent of IEnumerator.MoveNext + Current.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNonEnumeratedCount(System.Int32@)">
|
||||
<summary>
|
||||
Returns the length when processing time is not necessary.
|
||||
Always returns true if TryGetSpan or TryCopyTo returns true.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetSpan(System.ReadOnlySpan{`0}@)">
|
||||
<summary>
|
||||
Returns true if it can return a Span.
|
||||
Used for SIMD and loop processing optimization.
|
||||
If copying the entire value is acceptable, prioritize TryGetNonEnumeratedCount -> TryCopyTo instead.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryCopyTo(System.Span{`0},System.Index)">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
This serves as a TryGet function as well, e.g. single-span and ^1 is TryGetLast.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DropInGenerateTypes">
|
||||
<summary>
|
||||
Gets the types of collections for which LINQ implementations should be generated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.ConditionalCompilationSymbols">
|
||||
<summary>
|
||||
Gets or sets the conditional compilation symbols to wrap the generated code with #if directives.
|
||||
If specified, the generated code will be wrapped in #if/#endif directives using these symbols.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DisableEmitSource">
|
||||
<summary>
|
||||
Gets or sets whether to disable source generation in emitted code.
|
||||
When true, the source code comments will not be included in the generated code.
|
||||
When false (default), source code comments will be included in the generated code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ZLinqDropInAttribute.#ctor(System.String,ZLinq.DropInGenerateTypes)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:ZLinq.ZLinqDropInAttribute"/> class.
|
||||
</summary>
|
||||
<param name="generateNamespace">The namespace where the generated LINQ implementations will be placed. If empty, place to global.</param>
|
||||
<param name="dropInGenerateTypes">The types of collections for which LINQ implementations should be generated.</param>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute">
|
||||
<summary>
|
||||
Indicates the type of the async method builder that should be used by a language compiler to
|
||||
build the attributed async method or to build the attributed type when used as the return type
|
||||
of an async method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.#ctor(System.Type)">
|
||||
<summary>Initializes the <see cref="T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute"/>.</summary>
|
||||
<param name="builderType">The <see cref="T:System.Type"/> of the associated builder.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.BuilderType">
|
||||
<summary>Gets the <see cref="T:System.Type"/> of the associated builder.</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute">
|
||||
<summary>
|
||||
An attribute that allows parameters to receive the expression of other parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"/> class.
|
||||
</summary>
|
||||
<param name="parameterName">The condition parameter value.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.ParameterName">
|
||||
<summary>
|
||||
Gets the parameter name the expression is retrieved from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CollectionBuilderAttribute.#ctor(System.Type,System.String)">
|
||||
<summary>
|
||||
Initialize the attribute to refer to the <paramref name="methodName"/> method on the <paramref name="builderType"/> type.
|
||||
</summary>
|
||||
<param name="builderType">The type of the builder to use to construct the collection.</param>
|
||||
<param name="methodName">The name of the method on the builder to use to construct the collection.</param>
|
||||
<remarks>
|
||||
<paramref name="methodName"/> must refer to a static method that accepts a single parameter of
|
||||
type <see cref="T:System.ReadOnlySpan`1"/> and returns an instance of the collection being built containing
|
||||
a copy of the data from that span. In future releases of .NET, additional patterns may be supported.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.BuilderType">
|
||||
<summary>
|
||||
Gets the type of the builder to use to construct the collection.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.MethodName">
|
||||
<summary>
|
||||
Gets the name of the method on the builder to use to construct the collection.
|
||||
</summary>
|
||||
<remarks>
|
||||
This should match the metadata name of the target method.
|
||||
For example, this might be ".ctor" if targeting the type's constructor.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute">
|
||||
<summary>
|
||||
Indicates that compiler support for a particular feature is required for the location where this attribute is applied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new instance of the <see cref="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute"/> type.
|
||||
</summary>
|
||||
<param name="featureName">The name of the feature to indicate.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName">
|
||||
<summary>
|
||||
The name of the compiler feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional">
|
||||
<summary>
|
||||
If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RefStructs">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the ref structs C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RequiredMembers">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the required members C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute">
|
||||
<summary>
|
||||
Indicates which arguments to a method involving an interpolated string handler should be passed to that handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="argument">The name of the argument that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="arguments">The names of the arguments that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.Arguments">
|
||||
<summary>
|
||||
Gets the names of the arguments that should be passed to the handler.
|
||||
</summary>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute">
|
||||
<summary>
|
||||
Indicates the attributed type is to be used as an interpolated string handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.IsExternalInit">
|
||||
<summary>
|
||||
Reserved to be used by the compiler for tracking metadata.
|
||||
This class should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.ModuleInitializerAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that a method should be called
|
||||
in its containing module's initializer.
|
||||
</summary>
|
||||
<remarks>
|
||||
When one or more valid methods
|
||||
with this attribute are found in a compilation, the compiler will
|
||||
emit a module initializer which calls each of the attributed methods.
|
||||
|
||||
Certain requirements are imposed on any method targeted with this attribute:
|
||||
- The method must be `static`.
|
||||
- The method must be an ordinary member method, as opposed to a property accessor, constructor, local function, etc.
|
||||
- The method must be parameterless.
|
||||
- The method must return `void`.
|
||||
- The method must not be generic or be contained in a generic type.
|
||||
- The method's effective accessibility must be `internal` or `public`.
|
||||
|
||||
The specification for module initializers in the .NET runtime can be found here:
|
||||
https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md#module-initializer
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute">
|
||||
<summary>
|
||||
Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute"/> class.
|
||||
</summary>
|
||||
<param name="priority">The priority of the attributed member. Higher numbers are prioritized, lower numbers are deprioritized. 0 is the default if no attribute is present.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.Priority">
|
||||
<summary>
|
||||
The priority of the member.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.ParamCollectionAttribute">
|
||||
<summary>
|
||||
Indicates that a method will allow a variable number of arguments in its invocation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiredMemberAttribute">
|
||||
<summary>
|
||||
Specifies that a type has required members or that a member is required.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiresLocationAttribute">
|
||||
<summary>
|
||||
Reserved for use by a compiler for tracking metadata.
|
||||
This attribute should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.SkipLocalsInitAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class with the specified message.
|
||||
</summary>
|
||||
<param name="message">An optional message associated with this attribute instance.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Message">
|
||||
<summary>
|
||||
Returns the optional message associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Url">
|
||||
<summary>
|
||||
Returns the optional URL associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.AllowNullAttribute">
|
||||
<summary>
|
||||
Specifies that null is allowed as an input even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute">
|
||||
<summary>
|
||||
Indicates that the specified method parameter expects a constant.
|
||||
</summary>
|
||||
<remarks>
|
||||
This can be used to inform tooling that a constant should be used as an argument for the annotated parameter.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute.Min">
|
||||
<summary>
|
||||
Indicates the minimum bound of the expected constant, inclusive.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute.Max">
|
||||
<summary>
|
||||
Indicates the maximum bound of the expected constant, inclusive.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DisallowNullAttribute">
|
||||
<summary>
|
||||
Specifies that null is disallowed as an input even if the corresponding type allows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute">
|
||||
<summary>
|
||||
Applied to a method that will never return under any circumstance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute">
|
||||
<summary>
|
||||
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified parameter value.
|
||||
</summary>
|
||||
<param name="parameterValue">
|
||||
The condition parameter value. Code after the method will be considered unreachable
|
||||
by diagnostics if the argument to the associated parameter matches this value.
|
||||
</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute.ParameterValue">
|
||||
<summary>
|
||||
Gets the condition parameter value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute">
|
||||
<summary>
|
||||
Indicates that an API is experimental and it may change in the future.
|
||||
</summary>
|
||||
<remarks>
|
||||
This attribute allows call sites to be flagged with a diagnostic that indicates that an experimental
|
||||
feature is used. Authors can use this attribute to ship preview features in their assemblies.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute"/> class,
|
||||
specifying the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<param name="diagnosticId">The ID that the compiler will use when reporting a use of the API the attribute applies to.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.DiagnosticId">
|
||||
<summary>
|
||||
Gets the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<value>The unique diagnostic ID.</value>
|
||||
<remarks>
|
||||
The diagnostic ID is shown in build output for warnings and errors.
|
||||
<para>This property represents the unique ID that can be used to suppress the warnings or errors, if needed.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat">
|
||||
<summary>
|
||||
Gets or sets the URL for corresponding documentation.
|
||||
The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID.
|
||||
</summary>
|
||||
<value>The format string that represents a URL to corresponding documentation.</value>
|
||||
<remarks>An example format string is <c>https://contoso.com/obsoletion-warnings/{0}</c>.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MaybeNullAttribute">
|
||||
<summary>
|
||||
Specifies that an output may be null even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that when a method returns <see cref="P:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.ReturnValue"/>, the parameter may be null even if the corresponding type disallows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter may be null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute.ReturnValue">
|
||||
<summary>
|
||||
Gets the return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property members have not-null values.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with a field or property member.
|
||||
</summary>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the list of field and property members.
|
||||
</summary>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property
|
||||
members have not-null values when returning with the specified return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and a field or property member.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and list of field and property members.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.ReturnValue">
|
||||
<summary>
|
||||
Gets the return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullAttribute">
|
||||
<summary>
|
||||
Specifies that an output will not be null even if the corresponding type allows it.
|
||||
Specifies that an input argument was not null when the call returns.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute">
|
||||
<summary>
|
||||
Specifies that the output will be non-null if the named parameter is non-null.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with the associated parameter name.
|
||||
</summary>
|
||||
<param name="parameterName">The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute.ParameterName">
|
||||
<summary>
|
||||
Gets the associated parameter name.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that when a method returns <see cref="P:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.ReturnValue"/>, the parameter will not be null even if the corresponding type allows it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.#ctor(System.Boolean)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute.ReturnValue">
|
||||
<summary>Gets the return value condition.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute">
|
||||
<summary>
|
||||
Specifies that this constructor sets all required members for the current type,
|
||||
and callers do not need to set any required members themselves.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute">
|
||||
<summary>
|
||||
Specifies the syntax used in a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.
|
||||
</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String,System.Object[])">
|
||||
<summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
<param name="arguments">Optional arguments associated with the specific syntax employed.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Syntax">
|
||||
<summary>Gets the identifier of the syntax used.</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Arguments">
|
||||
<summary>Optional arguments associated with the specific syntax employed.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.CompositeFormat">
|
||||
<summary>The syntax identifier for strings containing composite formats for string formatting.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing date format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateTimeFormat">
|
||||
<summary>The syntax identifier for strings containing date and time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.EnumFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Enum"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.GuidFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Guid"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Json">
|
||||
<summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.NumericFormat">
|
||||
<summary>The syntax identifier for strings containing numeric format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex">
|
||||
<summary>The syntax identifier for strings containing regular expressions.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeSpanFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.TimeSpan"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Uri">
|
||||
<summary>The syntax identifier for strings containing URIs.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Xml">
|
||||
<summary>The syntax identifier for strings containing XML.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute">
|
||||
<summary>
|
||||
Used to indicate a byref escapes and is not scoped.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>
|
||||
There are several cases where the C# compiler treats a <see langword="ref"/> as implicitly
|
||||
<see langword="scoped"/> - where the compiler does not allow the <see langword="ref"/> to escape the method.
|
||||
</para>
|
||||
<para>
|
||||
For example:
|
||||
<list type="number">
|
||||
<item><see langword="this"/> for <see langword="struct"/> instance methods.</item>
|
||||
<item><see langword="ref"/> parameters that refer to <see langword="ref"/> <see langword="struct"/> types.</item>
|
||||
<item><see langword="out"/> parameters.</item>
|
||||
</list>
|
||||
</para>
|
||||
<para>
|
||||
This attribute is used in those instances where the <see langword="ref"/> should be allowed to escape.
|
||||
</para>
|
||||
<para>
|
||||
Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for
|
||||
API authors to understand the lifetime implications of applying this attribute and how it may impact their users.
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
7
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.xml.meta
vendored
Normal file
7
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.0/ZLinq.xml.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdcd340e8238cc54c879b5a74bc78aab
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1.meta
Normal file
8
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cad4af5fcf3e9854a955c7e365dc3032
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.dll
vendored
Normal file
BIN
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.dll
vendored
Normal file
Binary file not shown.
2
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.dll.meta
vendored
Normal file
2
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.dll.meta
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a77196d63d1f224888cec4efc9b92c8
|
||||
493
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.xml
vendored
Normal file
493
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.xml
vendored
Normal file
@@ -0,0 +1,493 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>ZLinq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Span{``1})">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
Returns the number of elements copied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.CopyTo``2(ZLinq.ValueEnumerable{``0,``1},System.Collections.Generic.List{``1})">
|
||||
<summary>
|
||||
List is cleared and then filled with the elements of the source. Destination size is list.Count.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ValueEnumerableExtensions.ToArrayPool``2(ZLinq.ValueEnumerable{``0,``1})">
|
||||
<summary>
|
||||
Converts to an array borrowed from ArrayPool<T>.Shared.
|
||||
For performance considerations, PooledArray is a struct, so
|
||||
copying or boxing it risks returning to the ArrayPool multiple times.
|
||||
Always use it simply with using and do not keep it for long periods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZLinq.PooledArray`1">
|
||||
<summary>
|
||||
Holds an array borrowed from ArrayPool<T>.Shared.Rent.
|
||||
When Disposed, it will Return the array to ArrayPool<T>.Shared.
|
||||
If boxed or passed by copy, there's a risk of multiple Returns.
|
||||
Please use it as is and avoid long-term retention.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNext(`0@)">
|
||||
<summary>
|
||||
Equivalent of IEnumerator.MoveNext + Current.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetNonEnumeratedCount(System.Int32@)">
|
||||
<summary>
|
||||
Returns the length when processing time is not necessary.
|
||||
Always returns true if TryGetSpan or TryCopyTo returns true.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryGetSpan(System.ReadOnlySpan{`0}@)">
|
||||
<summary>
|
||||
Returns true if it can return a Span.
|
||||
Used for SIMD and loop processing optimization.
|
||||
If copying the entire value is acceptable, prioritize TryGetNonEnumeratedCount -> TryCopyTo instead.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.IValueEnumerator`1.TryCopyTo(System.Span{`0},System.Index)">
|
||||
<summary>
|
||||
Unlike the semantics of normal CopyTo, this allows the destination to be smaller than the source.
|
||||
This serves as a TryGet function as well, e.g. single-span and ^1 is TryGetLast.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DropInGenerateTypes">
|
||||
<summary>
|
||||
Gets the types of collections for which LINQ implementations should be generated.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.ConditionalCompilationSymbols">
|
||||
<summary>
|
||||
Gets or sets the conditional compilation symbols to wrap the generated code with #if directives.
|
||||
If specified, the generated code will be wrapped in #if/#endif directives using these symbols.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInAttribute.DisableEmitSource">
|
||||
<summary>
|
||||
Gets or sets whether to disable source generation in emitted code.
|
||||
When true, the source code comments will not be included in the generated code.
|
||||
When false (default), source code comments will be included in the generated code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:ZLinq.ZLinqDropInAttribute.#ctor(System.String,ZLinq.DropInGenerateTypes)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:ZLinq.ZLinqDropInAttribute"/> class.
|
||||
</summary>
|
||||
<param name="generateNamespace">The namespace where the generated LINQ implementations will be placed. If empty, place to global.</param>
|
||||
<param name="dropInGenerateTypes">The types of collections for which LINQ implementations should be generated.</param>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateNamespace">
|
||||
<summary>
|
||||
Gets the namespace where the generated LINQ implementations will be placed.
|
||||
If empty, the implementations will be generated in the global namespace.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ZLinq.ZLinqDropInExternalExtensionAttribute.GenerateAsPublic">
|
||||
<summary>
|
||||
Gets whether the generated LINQ implementations should be public.
|
||||
When true, the implementations will be generated with public visibility.
|
||||
When false (default), the implementations will be generated with internal visibility.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute">
|
||||
<summary>
|
||||
An attribute that allows parameters to receive the expression of other parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"/> class.
|
||||
</summary>
|
||||
<param name="parameterName">The condition parameter value.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CallerArgumentExpressionAttribute.ParameterName">
|
||||
<summary>
|
||||
Gets the parameter name the expression is retrieved from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CollectionBuilderAttribute.#ctor(System.Type,System.String)">
|
||||
<summary>
|
||||
Initialize the attribute to refer to the <paramref name="methodName"/> method on the <paramref name="builderType"/> type.
|
||||
</summary>
|
||||
<param name="builderType">The type of the builder to use to construct the collection.</param>
|
||||
<param name="methodName">The name of the method on the builder to use to construct the collection.</param>
|
||||
<remarks>
|
||||
<paramref name="methodName"/> must refer to a static method that accepts a single parameter of
|
||||
type <see cref="T:System.ReadOnlySpan`1"/> and returns an instance of the collection being built containing
|
||||
a copy of the data from that span. In future releases of .NET, additional patterns may be supported.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.BuilderType">
|
||||
<summary>
|
||||
Gets the type of the builder to use to construct the collection.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.MethodName">
|
||||
<summary>
|
||||
Gets the name of the method on the builder to use to construct the collection.
|
||||
</summary>
|
||||
<remarks>
|
||||
This should match the metadata name of the target method.
|
||||
For example, this might be ".ctor" if targeting the type's constructor.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute">
|
||||
<summary>
|
||||
Indicates that compiler support for a particular feature is required for the location where this attribute is applied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new instance of the <see cref="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute"/> type.
|
||||
</summary>
|
||||
<param name="featureName">The name of the feature to indicate.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName">
|
||||
<summary>
|
||||
The name of the compiler feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional">
|
||||
<summary>
|
||||
If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RefStructs">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the ref structs C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RequiredMembers">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the required members C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute">
|
||||
<summary>
|
||||
Indicates which arguments to a method involving an interpolated string handler should be passed to that handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="argument">The name of the argument that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
|
||||
</summary>
|
||||
<param name="arguments">The names of the arguments that should be passed to the handler.</param>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute.Arguments">
|
||||
<summary>
|
||||
Gets the names of the arguments that should be passed to the handler.
|
||||
</summary>
|
||||
<remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute">
|
||||
<summary>
|
||||
Indicates the attributed type is to be used as an interpolated string handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.IsExternalInit">
|
||||
<summary>
|
||||
Reserved to be used by the compiler for tracking metadata.
|
||||
This class should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.ModuleInitializerAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that a method should be called
|
||||
in its containing module's initializer.
|
||||
</summary>
|
||||
<remarks>
|
||||
When one or more valid methods
|
||||
with this attribute are found in a compilation, the compiler will
|
||||
emit a module initializer which calls each of the attributed methods.
|
||||
|
||||
Certain requirements are imposed on any method targeted with this attribute:
|
||||
- The method must be `static`.
|
||||
- The method must be an ordinary member method, as opposed to a property accessor, constructor, local function, etc.
|
||||
- The method must be parameterless.
|
||||
- The method must return `void`.
|
||||
- The method must not be generic or be contained in a generic type.
|
||||
- The method's effective accessibility must be `internal` or `public`.
|
||||
|
||||
The specification for module initializers in the .NET runtime can be found here:
|
||||
https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md#module-initializer
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute">
|
||||
<summary>
|
||||
Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute"/> class.
|
||||
</summary>
|
||||
<param name="priority">The priority of the attributed member. Higher numbers are prioritized, lower numbers are deprioritized. 0 is the default if no attribute is present.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.Priority">
|
||||
<summary>
|
||||
The priority of the member.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.ParamCollectionAttribute">
|
||||
<summary>
|
||||
Indicates that a method will allow a variable number of arguments in its invocation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiredMemberAttribute">
|
||||
<summary>
|
||||
Specifies that a type has required members or that a member is required.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiresLocationAttribute">
|
||||
<summary>
|
||||
Reserved for use by a compiler for tracking metadata.
|
||||
This attribute should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.SkipLocalsInitAttribute">
|
||||
<summary>
|
||||
Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute"/> class with the specified message.
|
||||
</summary>
|
||||
<param name="message">An optional message associated with this attribute instance.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Message">
|
||||
<summary>
|
||||
Returns the optional message associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute.Url">
|
||||
<summary>
|
||||
Returns the optional URL associated with this attribute instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute">
|
||||
<summary>
|
||||
Indicates that the specified method parameter expects a constant.
|
||||
</summary>
|
||||
<remarks>
|
||||
This can be used to inform tooling that a constant should be used as an argument for the annotated parameter.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute.Min">
|
||||
<summary>
|
||||
Indicates the minimum bound of the expected constant, inclusive.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute.Max">
|
||||
<summary>
|
||||
Indicates the maximum bound of the expected constant, inclusive.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute">
|
||||
<summary>
|
||||
Indicates that an API is experimental and it may change in the future.
|
||||
</summary>
|
||||
<remarks>
|
||||
This attribute allows call sites to be flagged with a diagnostic that indicates that an experimental
|
||||
feature is used. Authors can use this attribute to ship preview features in their assemblies.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute"/> class,
|
||||
specifying the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<param name="diagnosticId">The ID that the compiler will use when reporting a use of the API the attribute applies to.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.DiagnosticId">
|
||||
<summary>
|
||||
Gets the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<value>The unique diagnostic ID.</value>
|
||||
<remarks>
|
||||
The diagnostic ID is shown in build output for warnings and errors.
|
||||
<para>This property represents the unique ID that can be used to suppress the warnings or errors, if needed.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat">
|
||||
<summary>
|
||||
Gets or sets the URL for corresponding documentation.
|
||||
The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID.
|
||||
</summary>
|
||||
<value>The format string that represents a URL to corresponding documentation.</value>
|
||||
<remarks>An example format string is <c>https://contoso.com/obsoletion-warnings/{0}</c>.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property members have not-null values.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with a field or property member.
|
||||
</summary>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.#ctor(System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the list of field and property members.
|
||||
</summary>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute">
|
||||
<summary>
|
||||
Specifies that the method or property will ensure that the listed field and property
|
||||
members have not-null values when returning with the specified return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String)">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and a field or property member.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="member">The field or property member that is promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.#ctor(System.Boolean,System.String[])">
|
||||
<summary>
|
||||
Initializes the attribute with the specified return value condition and list of field and property members.
|
||||
</summary>
|
||||
<param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
<param name="members">The list of field and property members that are promised to be not-null.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.ReturnValue">
|
||||
<summary>
|
||||
Gets the return value condition.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute.Members">
|
||||
<summary>
|
||||
Gets field or property member names.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute">
|
||||
<summary>
|
||||
Specifies that this constructor sets all required members for the current type,
|
||||
and callers do not need to set any required members themselves.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute">
|
||||
<summary>
|
||||
Specifies the syntax used in a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.
|
||||
</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String,System.Object[])">
|
||||
<summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
<param name="arguments">Optional arguments associated with the specific syntax employed.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Syntax">
|
||||
<summary>Gets the identifier of the syntax used.</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Arguments">
|
||||
<summary>Optional arguments associated with the specific syntax employed.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.CompositeFormat">
|
||||
<summary>The syntax identifier for strings containing composite formats for string formatting.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing date format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateTimeFormat">
|
||||
<summary>The syntax identifier for strings containing date and time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.EnumFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Enum"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.GuidFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Guid"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Json">
|
||||
<summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.NumericFormat">
|
||||
<summary>The syntax identifier for strings containing numeric format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex">
|
||||
<summary>The syntax identifier for strings containing regular expressions.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeSpanFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.TimeSpan"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Uri">
|
||||
<summary>The syntax identifier for strings containing URIs.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Xml">
|
||||
<summary>The syntax identifier for strings containing XML.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute">
|
||||
<summary>
|
||||
Used to indicate a byref escapes and is not scoped.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>
|
||||
There are several cases where the C# compiler treats a <see langword="ref"/> as implicitly
|
||||
<see langword="scoped"/> - where the compiler does not allow the <see langword="ref"/> to escape the method.
|
||||
</para>
|
||||
<para>
|
||||
For example:
|
||||
<list type="number">
|
||||
<item><see langword="this"/> for <see langword="struct"/> instance methods.</item>
|
||||
<item><see langword="ref"/> parameters that refer to <see langword="ref"/> <see langword="struct"/> types.</item>
|
||||
<item><see langword="out"/> parameters.</item>
|
||||
</list>
|
||||
</para>
|
||||
<para>
|
||||
This attribute is used in those instances where the <see langword="ref"/> should be allowed to escape.
|
||||
</para>
|
||||
<para>
|
||||
Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for
|
||||
API authors to understand the lifetime implications of applying this attribute and how it may impact their users.
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
7
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.xml.meta
vendored
Normal file
7
Packages/ZLinq.Unity/Runtime/Plugins/netstandard2.1/ZLinq.xml.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7a605d1d0408a541922b9b6ef98187d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
246
Packages/ZLinq.Unity/Runtime/TransformTraverser.cs
Normal file
246
Packages/ZLinq.Unity/Runtime/TransformTraverser.cs
Normal file
@@ -0,0 +1,246 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using ZLinq.Traversables;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
public static class TransformTraverserExtensions
|
||||
{
|
||||
public static TransformTraverser AsTraverser(this Transform origin) => new(origin);
|
||||
|
||||
// type inference helper
|
||||
|
||||
public static ValueEnumerable<Children<TransformTraverser, Transform>, Transform> Children(this TransformTraverser traverser) => traverser.Children<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<Children<TransformTraverser, Transform>, Transform> ChildrenAndSelf(this TransformTraverser traverser) => traverser.ChildrenAndSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<Descendants<TransformTraverser, Transform>, Transform> Descendants(this TransformTraverser traverser) => traverser.Descendants<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<Descendants<TransformTraverser, Transform>, Transform> DescendantsAndSelf(this TransformTraverser traverser) => traverser.DescendantsAndSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<Ancestors<TransformTraverser, Transform>, Transform> Ancestors(this TransformTraverser traverser) => traverser.Ancestors<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<Ancestors<TransformTraverser, Transform>, Transform> AncestorsAndSelf(this TransformTraverser traverser) => traverser.AncestorsAndSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<BeforeSelf<TransformTraverser, Transform>, Transform> BeforeSelf(this TransformTraverser traverser) => traverser.BeforeSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<BeforeSelf<TransformTraverser, Transform>, Transform> BeforeSelfAndSelf(this TransformTraverser traverser) => traverser.BeforeSelfAndSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<AfterSelf<TransformTraverser, Transform>, Transform> AfterSelf(this TransformTraverser traverser) => traverser.AfterSelf<TransformTraverser, Transform>();
|
||||
public static ValueEnumerable<AfterSelf<TransformTraverser, Transform>, Transform> AfterSelfAndSelf(this TransformTraverser traverser) => traverser.AfterSelfAndSelf<TransformTraverser, Transform>();
|
||||
|
||||
// direct shortcut
|
||||
|
||||
public static ValueEnumerable<Children<TransformTraverser, Transform>, Transform> Children(this Transform origin) => origin.AsTraverser().Children();
|
||||
public static ValueEnumerable<Children<TransformTraverser, Transform>, Transform> ChildrenAndSelf(this Transform origin) => origin.AsTraverser().ChildrenAndSelf();
|
||||
public static ValueEnumerable<Descendants<TransformTraverser, Transform>, Transform> Descendants(this Transform origin) => origin.AsTraverser().Descendants();
|
||||
public static ValueEnumerable<Descendants<TransformTraverser, Transform>, Transform> DescendantsAndSelf(this Transform origin) => origin.AsTraverser().DescendantsAndSelf();
|
||||
public static ValueEnumerable<Ancestors<TransformTraverser, Transform>, Transform> Ancestors(this Transform origin) => origin.AsTraverser().Ancestors();
|
||||
public static ValueEnumerable<Ancestors<TransformTraverser, Transform>, Transform> AncestorsAndSelf(this Transform origin) => origin.AsTraverser().AncestorsAndSelf();
|
||||
public static ValueEnumerable<BeforeSelf<TransformTraverser, Transform>, Transform> BeforeSelf(this Transform origin) => origin.AsTraverser().BeforeSelf();
|
||||
public static ValueEnumerable<BeforeSelf<TransformTraverser, Transform>, Transform> BeforeSelfAndSelf(this Transform origin) => origin.AsTraverser().BeforeSelfAndSelf();
|
||||
public static ValueEnumerable<AfterSelf<TransformTraverser, Transform>, Transform> AfterSelf(this Transform origin) => origin.AsTraverser().AfterSelf();
|
||||
public static ValueEnumerable<AfterSelf<TransformTraverser, Transform>, Transform> AfterSelfAndSelf(this Transform origin) => origin.AsTraverser().AfterSelfAndSelf();
|
||||
|
||||
// OfComponent
|
||||
|
||||
public static ValueEnumerable<OfComponentT<Children<TransformTraverser, Transform>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Children<TransformTraverser, Transform>, Transform> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentT<Descendants<TransformTraverser, Transform>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Descendants<TransformTraverser, Transform>, Transform> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentT<Ancestors<TransformTraverser, Transform>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<Ancestors<TransformTraverser, Transform>, Transform> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentT<BeforeSelf<TransformTraverser, Transform>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<BeforeSelf<TransformTraverser, Transform>, Transform> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
|
||||
public static ValueEnumerable<OfComponentT<AfterSelf<TransformTraverser, Transform>, TComponent>, TComponent> OfComponent<TComponent>(this ValueEnumerable<AfterSelf<TransformTraverser, Transform>, Transform> source)
|
||||
where TComponent : Component => new(new(source.Enumerator));
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct TransformTraverser : ITraverser<TransformTraverser, Transform>
|
||||
{
|
||||
static readonly object CalledTryGetNextChild = new object();
|
||||
static readonly object ParentNotFound = new object();
|
||||
|
||||
readonly Transform transform;
|
||||
object? initializedState; // CalledTryGetNext or Parent(for sibling operations)
|
||||
int childCount; // self childCount(TryGetNextChild) or parent childCount(TryGetSibling)
|
||||
int index;
|
||||
|
||||
public TransformTraverser(Transform origin)
|
||||
{
|
||||
this.transform = origin;
|
||||
this.initializedState = null;
|
||||
this.childCount = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public Transform Origin => transform;
|
||||
public TransformTraverser ConvertToTraverser(Transform next) => new(next);
|
||||
|
||||
public bool TryGetParent(out Transform parent)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp != null)
|
||||
{
|
||||
parent = tp;
|
||||
return true;
|
||||
}
|
||||
|
||||
parent = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetChildCount(out int count)
|
||||
{
|
||||
count = transform.childCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetHasChild(out bool hasChild)
|
||||
{
|
||||
hasChild = transform.childCount != 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetNextChild(out Transform child)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
initializedState = CalledTryGetNextChild;
|
||||
childCount = transform.childCount;
|
||||
}
|
||||
|
||||
if (index < childCount)
|
||||
{
|
||||
child = transform.GetChild(index++);
|
||||
return true;
|
||||
}
|
||||
|
||||
child = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNextSibling(out Transform next)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp == null)
|
||||
{
|
||||
var scene = transform.gameObject.scene;
|
||||
// check is scene root object
|
||||
if (scene.IsValid())
|
||||
{
|
||||
initializedState = scene;
|
||||
childCount = scene.rootCount;
|
||||
index = transform.GetSiblingIndex() + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// cache parent and childCount
|
||||
initializedState = tp;
|
||||
childCount = tp.childCount; // parent's childCount
|
||||
index = transform.GetSiblingIndex() + 1;
|
||||
}
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (initializedState is Transform parent)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
next = parent.GetChild(index++);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (initializedState is UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
var list = UnityEngine.Pool.ListPool<GameObject>.Get();
|
||||
scene.GetRootGameObjects(list);
|
||||
next = list[index++].transform;
|
||||
UnityEngine.Pool.ListPool<GameObject>.Release(list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetPreviousSibling(out Transform previous)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var tp = transform.parent;
|
||||
if (tp == null)
|
||||
{
|
||||
var scene = transform.gameObject.scene;
|
||||
// check is scene root object
|
||||
if (scene.IsValid())
|
||||
{
|
||||
initializedState = scene;
|
||||
childCount = transform.GetSiblingIndex();
|
||||
index = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
initializedState = tp;
|
||||
childCount = transform.GetSiblingIndex(); // not childCount but means `to`
|
||||
index = 0; // 0 to siblingIndex
|
||||
}
|
||||
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (initializedState is Transform parent)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
previous = parent.GetChild(index++);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (initializedState is UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
if (index < childCount)
|
||||
{
|
||||
var list = UnityEngine.Pool.ListPool<GameObject>.Get();
|
||||
scene.GetRootGameObjects(list);
|
||||
previous = list[index++].transform;
|
||||
UnityEngine.Pool.ListPool<GameObject>.Release(list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Packages/ZLinq.Unity/Runtime/TransformTraverser.cs.meta
Normal file
11
Packages/ZLinq.Unity/Runtime/TransformTraverser.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: baafa2101b17837489b25922da59f758
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
181
Packages/ZLinq.Unity/Runtime/VisualElementTraverser.cs
Normal file
181
Packages/ZLinq.Unity/Runtime/VisualElementTraverser.cs
Normal file
@@ -0,0 +1,181 @@
|
||||
#if ZLINQ_UNITY_UIELEMENTS_SUPPORT
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine.UIElements;
|
||||
using ZLinq.Traversables;
|
||||
|
||||
namespace ZLinq
|
||||
{
|
||||
public static class VisualTraverserExtensions
|
||||
{
|
||||
public static VisualElementTraverser AsTraverser(this VisualElement origin) => new(origin);
|
||||
|
||||
// type inference helper
|
||||
|
||||
public static ValueEnumerable<Children<VisualElementTraverser, VisualElement>, VisualElement> Children(this VisualElementTraverser traverser) => traverser.Children<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<Children<VisualElementTraverser, VisualElement>, VisualElement> ChildrenAndSelf(this VisualElementTraverser traverser) => traverser.ChildrenAndSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<Descendants<VisualElementTraverser, VisualElement>, VisualElement> Descendants(this VisualElementTraverser traverser) => traverser.Descendants<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<Descendants<VisualElementTraverser, VisualElement>, VisualElement> DescendantsAndSelf(this VisualElementTraverser traverser) => traverser.DescendantsAndSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<Ancestors<VisualElementTraverser, VisualElement>, VisualElement> Ancestors(this VisualElementTraverser traverser) => traverser.Ancestors<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<Ancestors<VisualElementTraverser, VisualElement>, VisualElement> AncestorsAndSelf(this VisualElementTraverser traverser) => traverser.AncestorsAndSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<BeforeSelf<VisualElementTraverser, VisualElement>, VisualElement> BeforeSelf(this VisualElementTraverser traverser) => traverser.BeforeSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<BeforeSelf<VisualElementTraverser, VisualElement>, VisualElement> BeforeSelfAndSelf(this VisualElementTraverser traverser) => traverser.BeforeSelfAndSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<AfterSelf<VisualElementTraverser, VisualElement>, VisualElement> AfterSelf(this VisualElementTraverser traverser) => traverser.AfterSelf<VisualElementTraverser, VisualElement>();
|
||||
public static ValueEnumerable<AfterSelf<VisualElementTraverser, VisualElement>, VisualElement> AfterSelfAndSelf(this VisualElementTraverser traverser) => traverser.AfterSelfAndSelf<VisualElementTraverser, VisualElement>();
|
||||
|
||||
// direct shortcut
|
||||
|
||||
public static ValueEnumerable<Children<VisualElementTraverser, VisualElement>, VisualElement> Children(this VisualElement origin) => origin.AsTraverser().Children();
|
||||
public static ValueEnumerable<Children<VisualElementTraverser, VisualElement>, VisualElement> ChildrenAndSelf(this VisualElement origin) => origin.AsTraverser().ChildrenAndSelf();
|
||||
public static ValueEnumerable<Descendants<VisualElementTraverser, VisualElement>, VisualElement> Descendants(this VisualElement origin) => origin.AsTraverser().Descendants();
|
||||
public static ValueEnumerable<Descendants<VisualElementTraverser, VisualElement>, VisualElement> DescendantsAndSelf(this VisualElement origin) => origin.AsTraverser().DescendantsAndSelf();
|
||||
public static ValueEnumerable<Ancestors<VisualElementTraverser, VisualElement>, VisualElement> Ancestors(this VisualElement origin) => origin.AsTraverser().Ancestors();
|
||||
public static ValueEnumerable<Ancestors<VisualElementTraverser, VisualElement>, VisualElement> AncestorsAndSelf(this VisualElement origin) => origin.AsTraverser().AncestorsAndSelf();
|
||||
public static ValueEnumerable<BeforeSelf<VisualElementTraverser, VisualElement>, VisualElement> BeforeSelf(this VisualElement origin) => origin.AsTraverser().BeforeSelf();
|
||||
public static ValueEnumerable<BeforeSelf<VisualElementTraverser, VisualElement>, VisualElement> BeforeSelfAndSelf(this VisualElement origin) => origin.AsTraverser().BeforeSelfAndSelf();
|
||||
public static ValueEnumerable<AfterSelf<VisualElementTraverser, VisualElement>, VisualElement> AfterSelf(this VisualElement origin) => origin.AsTraverser().AfterSelf();
|
||||
public static ValueEnumerable<AfterSelf<VisualElementTraverser, VisualElement>, VisualElement> AfterSelfAndSelf(this VisualElement origin) => origin.AsTraverser().AfterSelfAndSelf();
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct VisualElementTraverser : ITraverser<VisualElementTraverser, VisualElement>
|
||||
{
|
||||
static readonly object CalledTryGetNextChild = new object();
|
||||
static readonly object ParentNotFound = new object();
|
||||
|
||||
readonly VisualElement visualElement;
|
||||
object? initializedState; // CalledTryGetNext or Parent(for sibling operations)
|
||||
int childCount; // self childCount(TryGetNextChild) or parent childCount(TryGetSibling)
|
||||
int index;
|
||||
|
||||
public VisualElementTraverser(VisualElement origin)
|
||||
{
|
||||
this.visualElement = origin;
|
||||
this.initializedState = null;
|
||||
this.childCount = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public VisualElement Origin => visualElement;
|
||||
public VisualElementTraverser ConvertToTraverser(VisualElement next) => new(next);
|
||||
|
||||
public bool TryGetParent(out VisualElement parent)
|
||||
{
|
||||
var veParent = visualElement.parent;
|
||||
if (veParent != null)
|
||||
{
|
||||
parent = veParent;
|
||||
return true;
|
||||
}
|
||||
|
||||
parent = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetChildCount(out int count)
|
||||
{
|
||||
count = visualElement.childCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetHasChild(out bool hasChild)
|
||||
{
|
||||
hasChild = visualElement.childCount != 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryGetNextChild(out VisualElement child)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
initializedState = CalledTryGetNextChild;
|
||||
childCount = visualElement.childCount;
|
||||
}
|
||||
|
||||
if (index < childCount)
|
||||
{
|
||||
child = visualElement[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
child = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetNextSibling(out VisualElement next)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var veParent = visualElement.parent;
|
||||
if (veParent == null)
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
// cache parent and childCount
|
||||
initializedState = veParent;
|
||||
childCount = veParent.childCount; // parent's childCount
|
||||
index = veParent.IndexOf(visualElement) + 1;
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
var parent = (VisualElement)initializedState;
|
||||
if (index < childCount)
|
||||
{
|
||||
next = parent[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
next = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetPreviousSibling(out VisualElement previous)
|
||||
{
|
||||
if (initializedState == null)
|
||||
{
|
||||
var veParent = visualElement.parent;
|
||||
if (veParent == null)
|
||||
{
|
||||
initializedState = ParentNotFound;
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
initializedState = veParent;
|
||||
childCount = veParent.IndexOf(visualElement); // not childCount but means `to`
|
||||
index = 0; // 0 to siblingIndex
|
||||
}
|
||||
else if (initializedState == ParentNotFound)
|
||||
{
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
var parent = (VisualElement)initializedState;
|
||||
if (index < childCount)
|
||||
{
|
||||
previous = parent[index++];
|
||||
return true;
|
||||
}
|
||||
|
||||
previous = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14298ef73943e428da8cae7f81b28e47
|
||||
27
Packages/ZLinq.Unity/Runtime/ZLinq.Unity.asmdef
Normal file
27
Packages/ZLinq.Unity/Runtime/ZLinq.Unity.asmdef
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "ZLinq.Unity",
|
||||
"rootNamespace": "ZLinq",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"ZLinq.dll"
|
||||
],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.modules.uielements",
|
||||
"expression": "",
|
||||
"define": "ZLINQ_UNITY_UIELEMENTS_SUPPORT"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.collections",
|
||||
"expression": "",
|
||||
"define": "ZLINQ_UNITY_COLLECTIONS_SUPPORT"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
Packages/ZLinq.Unity/Runtime/ZLinq.Unity.asmdef.meta
Normal file
7
Packages/ZLinq.Unity/Runtime/ZLinq.Unity.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c71612acbe346a344abbc0dcfdf4f0bd
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
Packages/ZLinq.Unity/package.json
Normal file
11
Packages/ZLinq.Unity/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "com.cysharp.zlinq",
|
||||
"displayName": "ZLinq",
|
||||
"author": { "name": "Cysharp, Inc.", "url": "https://cysharp.co.jp/en/" },
|
||||
"version": "1.5.5",
|
||||
"unity": "2021.3",
|
||||
"description": "Zero allocation LINQ with Span and LINQ to SIMD, LINQ to Tree(FileSystem, GameObject, etc...) for all .NET platforms and Unity.",
|
||||
"keywords": [ "LINQ" ],
|
||||
"license": "MIT",
|
||||
"category": "Scripting"
|
||||
}
|
||||
7
Packages/ZLinq.Unity/package.json.meta
Normal file
7
Packages/ZLinq.Unity/package.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b6e5bc3013c2ae49837f6b3aaf0a230
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2
Packages/ayellowpaper.serialized-dictionary/.gitignore
vendored
Normal file
2
Packages/ayellowpaper.serialized-dictionary/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.claude/
|
||||
.idea/
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
BIN
Packages/ayellowpaper.serialized-dictionary/.images/menu.png
Normal file
BIN
Packages/ayellowpaper.serialized-dictionary/.images/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
BIN
Packages/ayellowpaper.serialized-dictionary/.images/populate.png
Normal file
BIN
Packages/ayellowpaper.serialized-dictionary/.images/populate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
8
Packages/ayellowpaper.serialized-dictionary/Editor.meta
Normal file
8
Packages/ayellowpaper.serialized-dictionary/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43bd94852ddc6b34dbe9fec318fb54d8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "AYellowpaper.SerializedCollections.Editor",
|
||||
"references": [
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 234340c04eed5674a988bc6ebde7d248
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edb739dfb1824234681f6480c75cd523
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,170 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8deddfed9f39d7740879d2cb0fcf7ce0
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Windows Store Apps
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 8192
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,110 @@
|
||||
.sc-close-button {
|
||||
background-image: resource('d_winbtn_win_close@2x');
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 2px;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-left-width: 0;
|
||||
border-right-width: 0;
|
||||
border-top-width: 0;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.sc-close-button:hover {
|
||||
background-color: rgba(80, 80, 80, 255);
|
||||
}
|
||||
|
||||
.sc-close-button:active {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.sc-text-toggle {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.sc-text-toggle:checked {
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.sc-text-toggle > Label {
|
||||
min-width: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sc-text-toggle > .unity-radio-button__input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sc-title {
|
||||
background-color: rgba(40, 40, 40, 0.35);
|
||||
padding-left: 4px;
|
||||
padding-right: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
border-left-color: rgb(25, 25, 25);
|
||||
border-right-color: rgb(25, 25, 25);
|
||||
border-top-color: rgb(25, 25, 25);
|
||||
border-bottom-color: rgb(25, 25, 25);
|
||||
border-bottom-width: 1px;
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.sc-generator-toggle {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.sc-generator-toggle:hover {
|
||||
background-color: rgb(48, 48, 48);
|
||||
}
|
||||
|
||||
.sc-generator-toggle:checked {
|
||||
background-color: rgb(77, 77, 77);
|
||||
}
|
||||
|
||||
.sc-modification-toggle {
|
||||
flex-basis: 100%;
|
||||
flex-shrink: 1;
|
||||
border-left-color: rgb(41, 41, 41);
|
||||
border-right-color: rgb(41, 41, 41);
|
||||
border-top-color: rgb(41, 41, 41);
|
||||
border-bottom-color: rgb(41, 41, 41);
|
||||
border-left-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-top-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
-unity-font-style: normal;
|
||||
-unity-text-align: middle-center;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.sc-modification-toggle:hover {
|
||||
background-color: rgb(70, 70, 70);
|
||||
}
|
||||
|
||||
.sc-modification-toggle:checked {
|
||||
background-color: rgb(80, 80, 80);
|
||||
}
|
||||
|
||||
.sc-radio-button-group {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sc-radio-button-group > Label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#generators-group {
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df6c2ef835e40c94c976442569324029
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
@@ -0,0 +1,26 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
|
||||
<Style src="project://database/Assets/Plugins/SerializedCollections/Editor/Assets/KeysGeneratorSelectorWindow.uss?fileID=7433441132597879392&guid=df6c2ef835e40c94c976442569324029&type=3#KeysGeneratorSelectorWindow" />
|
||||
<ui:VisualElement style="flex-direction: row; flex-grow: 1; border-left-color: rgb(97, 97, 97); border-right-color: rgb(97, 97, 97); border-top-color: rgb(97, 97, 97); border-bottom-color: rgb(97, 97, 97); border-left-width: 2px; border-right-width: 2px; border-top-width: 2px; border-bottom-width: 2px;">
|
||||
<ui:VisualElement name="LeftContent" style="flex-basis: 66%; border-left-color: rgb(25, 25, 25); border-right-color: rgb(25, 25, 25); border-top-color: rgb(25, 25, 25); border-bottom-color: rgb(25, 25, 25); border-right-width: 1px;">
|
||||
<ui:Label text="Generators" display-tooltip-when-elided="true" class="sc-title" />
|
||||
<ui:ScrollView scroll-deceleration-rate="0,135" elasticity="0,1" name="generators-content" style="flex-grow: 1;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="RightContent" style="flex-basis: 100%;">
|
||||
<ui:Label text="Inspector" display-tooltip-when-elided="true" class="sc-title" />
|
||||
<ui:IMGUIContainer name="imgui-inspector" style="flex-grow: 1; margin-left: 4px; margin-right: 4px; margin-top: 4px; margin-bottom: 4px;" />
|
||||
<ui:Label text="4 Elements " display-tooltip-when-elided="true" name="generated-count-label" style="padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;" />
|
||||
<ui:VisualElement style="flex-direction: row;">
|
||||
<ui:RadioButtonGroup label="Radio Button Group" value="-1" name="modification-group" class="sc-radio-button-group" style="flex-grow: 1;">
|
||||
<ui:RadioButton label="Add" name="add-modification" tooltip="Add the generated missing keys to the target." class="sc-text-toggle sc-modification-toggle" />
|
||||
<ui:RadioButton label="Remove" name="remove-modification" tooltip="Remove the generated keys form the target." class="sc-text-toggle sc-modification-toggle" />
|
||||
<ui:RadioButton label="Confine" name="confine-modification" tooltip="Remove all keys that are not part of the generated keys from the target." class="sc-text-toggle sc-modification-toggle" />
|
||||
</ui:RadioButtonGroup>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement style="flex-direction: row;">
|
||||
<ui:Label display-tooltip-when-elided="true" name="result-label" style="flex-grow: 1; -unity-text-align: middle-left; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;" />
|
||||
<ui:Button text="Apply" display-tooltip-when-elided="true" name="apply-button" style="width: 100px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:Button display-tooltip-when-elided="true" class="sc-close-button" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 681c8a924c8b1e14b9fe53bb7397ec3d
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6398825db0c1d5348b5ec85b0c12d9c0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81bf46994f9232b4e8dcf467c109f046
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor.Data
|
||||
{
|
||||
[System.Serializable]
|
||||
internal class ElementData
|
||||
{
|
||||
[SerializeField]
|
||||
private bool _isListToggleActive = false;
|
||||
|
||||
public ElementSettings Settings { get; }
|
||||
public bool ShowAsList => Settings.HasListDrawerToggle && IsListToggleActive;
|
||||
public bool IsListToggleActive { get => _isListToggleActive; set => _isListToggleActive = value; }
|
||||
public DisplayType EffectiveDisplayType => ShowAsList ? DisplayType.List : Settings.DisplayType;
|
||||
|
||||
public ElementData(ElementSettings elementSettings)
|
||||
{
|
||||
Settings = elementSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 650a80186cc93b54aa5627197c23ea6e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor.Data
|
||||
{
|
||||
public class ElementSettings
|
||||
{
|
||||
public const string DefaultName = "Not Set";
|
||||
|
||||
public string DisplayName { get; set; } = DefaultName;
|
||||
public DisplayType DisplayType { get; set; } = DisplayType.PropertyNoLabel;
|
||||
public bool HasListDrawerToggle { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12edfc8006691b7498459540b832c5eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor.Data
|
||||
{
|
||||
[System.Serializable]
|
||||
internal class PropertyData
|
||||
{
|
||||
[SerializeField]
|
||||
private ElementData _keyData;
|
||||
[SerializeField]
|
||||
private ElementData _valueData;
|
||||
[SerializeField]
|
||||
private bool _alwaysShowSearch = false;
|
||||
|
||||
public bool AlwaysShowSearch
|
||||
{
|
||||
get => _alwaysShowSearch;
|
||||
set => _alwaysShowSearch = value;
|
||||
}
|
||||
|
||||
public ElementData GetElementData(bool fieldType)
|
||||
{
|
||||
return fieldType == SCEditorUtility.KeyFlag ? _keyData : _valueData;
|
||||
}
|
||||
|
||||
public PropertyData() : this(new ElementSettings(), new ElementSettings()) { }
|
||||
|
||||
public PropertyData(ElementSettings keySettings, ElementSettings valueSettings)
|
||||
{
|
||||
_keyData = new ElementData(keySettings);
|
||||
_valueData = new ElementData(valueSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba2d792dfc6653e46bee7c027202acd3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor
|
||||
{
|
||||
public enum DisplayType
|
||||
{
|
||||
Property,
|
||||
PropertyNoLabel,
|
||||
List
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37ee13dd67b545846b6b063923812943
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d74b279cd03ebfb4ca7d2606f3f4f11e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10b0c99dadaea0e42b49e323700f2eb9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
[KeyListGenerator("Populate Enum", typeof(System.Enum), false)]
|
||||
public class EnumGenerator : KeyListGenerator
|
||||
{
|
||||
public override IEnumerable GetKeys(System.Type type)
|
||||
{
|
||||
return System.Enum.GetValues(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d639de5d36bbeea4496c97cc3f1f4e81
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
[KeyListGenerator("Int Range", typeof(int))]
|
||||
public class IntRangeGenerator : KeyListGenerator
|
||||
{
|
||||
[SerializeField]
|
||||
private int _startValue = 1;
|
||||
[SerializeField]
|
||||
private int _endValue = 10;
|
||||
|
||||
public override IEnumerable GetKeys(Type type)
|
||||
{
|
||||
int dir = Math.Sign(_endValue - _startValue);
|
||||
dir = dir == 0 ? 1 : dir;
|
||||
for (int i = _startValue; i != _endValue; i += dir)
|
||||
yield return i;
|
||||
yield return _endValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4203f3a582fa874fb035633bd9892b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
[KeyListGenerator("Int Stepping", typeof(int))]
|
||||
public class IntSteppingGenerator : KeyListGenerator
|
||||
{
|
||||
[SerializeField]
|
||||
private int _startIndex = 0;
|
||||
[SerializeField]
|
||||
private int _stepDistance = 10;
|
||||
[SerializeField, Min(0)]
|
||||
private int _stepCount = 1;
|
||||
|
||||
public override IEnumerable GetKeys(Type type)
|
||||
{
|
||||
for (int i = 0; i <= _stepCount; i++)
|
||||
{
|
||||
yield return _startIndex + i * _stepDistance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99302d4ff0ae27b4898ced57890ed32d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
public abstract class KeyListGenerator : ScriptableObject
|
||||
{
|
||||
public abstract IEnumerable GetKeys(System.Type type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08149f25a1b9c5e48a224a7c4d31a154
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class KeyListGeneratorAttribute : Attribute
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly Type TargetType;
|
||||
public readonly bool NeedsWindow;
|
||||
|
||||
public KeyListGeneratorAttribute(string name, Type targetType, bool needsWindow = true)
|
||||
{
|
||||
Name = name;
|
||||
TargetType = targetType;
|
||||
NeedsWindow = needsWindow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f6065c936425ab478ecc8a8cf30d38f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
public static class KeyListGeneratorCache
|
||||
{
|
||||
private static List<KeyListGeneratorData> _populators;
|
||||
private static Dictionary<Type, List<KeyListGeneratorData>> _populatorsByType;
|
||||
|
||||
static KeyListGeneratorCache()
|
||||
{
|
||||
_populators = new List<KeyListGeneratorData>();
|
||||
_populatorsByType = new Dictionary<Type, List<KeyListGeneratorData>>();
|
||||
var populatorTypes = TypeCache.GetTypesDerivedFrom<KeyListGenerator>();
|
||||
foreach (var populatorType in populatorTypes.Where(x => !x.IsAbstract))
|
||||
{
|
||||
var attributes = populatorType.GetCustomAttributes<KeyListGeneratorAttribute>();
|
||||
foreach (var attribute in attributes)
|
||||
_populators.Add(new KeyListGeneratorData(attribute.Name, attribute.TargetType, populatorType, attribute.NeedsWindow));
|
||||
}
|
||||
}
|
||||
|
||||
public static IReadOnlyList<KeyListGeneratorData> GetPopulatorsForType(Type type)
|
||||
{
|
||||
if (!_populatorsByType.ContainsKey(type))
|
||||
_populatorsByType.Add(type, new List<KeyListGeneratorData>(_populators.Where(x => x.TargetType.IsAssignableFrom(type))));
|
||||
return _populatorsByType[type];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7936217ae19613d4bb5e46e73a4a587c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
public class KeyListGeneratorData
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Type TargetType { get; set; }
|
||||
public Type GeneratorType { get; set; }
|
||||
public bool NeedsWindow { get; set; }
|
||||
|
||||
public KeyListGeneratorData(string name, Type targetType, Type populatorType, bool needsWindow)
|
||||
{
|
||||
Name = name;
|
||||
TargetType = targetType;
|
||||
GeneratorType = populatorType;
|
||||
NeedsWindow = needsWindow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8992145ced672cd46a425fb2590b80bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
[CustomEditor(typeof(KeyListGenerator), true)]
|
||||
public class KeyListGeneratorEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var iterator = serializedObject.GetIterator();
|
||||
if (iterator.Next(true))
|
||||
{
|
||||
// skip script name
|
||||
iterator.NextVisible(true);
|
||||
while (iterator.NextVisible(true))
|
||||
{
|
||||
EditorGUILayout.PropertyField(iterator);
|
||||
}
|
||||
}
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 211518bea98ede643af247b6295984bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,182 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.KeysGenerators
|
||||
{
|
||||
public class KeyListGeneratorSelectorWindow : EditorWindow
|
||||
{
|
||||
[SerializeField]
|
||||
private int _selectedIndex;
|
||||
[SerializeField]
|
||||
private ModificationType _modificationType;
|
||||
|
||||
private KeyListGenerator _generator;
|
||||
private UnityEditor.Editor _editor;
|
||||
private List<KeyListGeneratorData> _generatorsData;
|
||||
private Type _targetType;
|
||||
private int _undoStart;
|
||||
private Dictionary<Type, KeyListGenerator> _keysGenerators = new Dictionary<Type, KeyListGenerator>();
|
||||
private string _detailsText;
|
||||
|
||||
public event Action<KeyListGenerator, ModificationType> OnApply;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
VisualTreeAsset document = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Plugins/SerializedCollections/Editor/Assets/KeysGeneratorSelectorWindow.uxml");
|
||||
var element = document.CloneTree();
|
||||
element.style.height = new StyleLength(new Length(100, LengthUnit.Percent));
|
||||
rootVisualElement.Add(element);
|
||||
}
|
||||
|
||||
public void Initialize(IEnumerable<KeyListGeneratorData> generatorsData, Type type)
|
||||
{
|
||||
_targetType = type;
|
||||
_selectedIndex = 0;
|
||||
_modificationType = ModificationType.Add;
|
||||
_undoStart = Undo.GetCurrentGroup();
|
||||
_generatorsData = new List<KeyListGeneratorData>(generatorsData);
|
||||
SetGeneratorIndex(0);
|
||||
Undo.undoRedoPerformed += HandleUndoCallback;
|
||||
|
||||
rootVisualElement.Q<Button>(className: "sc-close-button").clicked += Close;
|
||||
|
||||
rootVisualElement.Q<RadioButton>(name = "add-modification").userData = ModificationType.Add;
|
||||
rootVisualElement.Q<RadioButton>(name = "remove-modification").userData = ModificationType.Remove;
|
||||
rootVisualElement.Q<RadioButton>(name = "confine-modification").userData = ModificationType.Confine;
|
||||
|
||||
var modificationToggles = rootVisualElement.Query<RadioButton>(className: "sc-modification-toggle");
|
||||
modificationToggles.ForEach(InitializeModificationToggle);
|
||||
|
||||
rootVisualElement.Q<IMGUIContainer>(name = "imgui-inspector").onGUIHandler = EditorGUIHandler;
|
||||
rootVisualElement.Q<Button>(name = "apply-button").clicked += ApplyButtonClicked;
|
||||
|
||||
var generatorsContent = rootVisualElement.Q<ScrollView>(name = "generators-content");
|
||||
var radioButtonGroup = new RadioButtonGroup();
|
||||
radioButtonGroup.name = "generators-group";
|
||||
radioButtonGroup.AddToClassList("sc-radio-button-group");
|
||||
generatorsContent.Add(radioButtonGroup);
|
||||
|
||||
for (int i = 0; i < _generatorsData.Count; i++)
|
||||
{
|
||||
var generatorData = _generatorsData[i];
|
||||
|
||||
var radioButton = new RadioButton(generatorData.Name);
|
||||
radioButton.value = i == 0;
|
||||
radioButton.AddToClassList("sc-text-toggle");
|
||||
radioButton.AddToClassList("sc-generator-toggle");
|
||||
radioButton.userData = i;
|
||||
radioButton.RegisterValueChangedCallback(OnGeneratorClicked);
|
||||
radioButtonGroup.Add(radioButton);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyButtonClicked()
|
||||
{
|
||||
OnApply?.Invoke(_editor.target as KeyListGenerator, _modificationType);
|
||||
OnApply = null;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void EditorGUIHandler()
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_editor.OnInspectorGUI();
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
UpdateDetailsText();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeModificationToggle(RadioButton obj)
|
||||
{
|
||||
if ((ModificationType)obj.userData == _modificationType)
|
||||
obj.value = true;
|
||||
obj.RegisterValueChangedCallback(OnModificationToggleClicked);
|
||||
}
|
||||
|
||||
private void OnModificationToggleClicked(ChangeEvent<bool> evt)
|
||||
{
|
||||
if (!evt.newValue)
|
||||
return;
|
||||
|
||||
var modificationType = (ModificationType)((VisualElement)evt.target).userData;
|
||||
_modificationType = modificationType;
|
||||
}
|
||||
|
||||
private void UpdateDetailsText()
|
||||
{
|
||||
var enumerable = _generator.GetKeys(_targetType);
|
||||
int count = 0;
|
||||
var enumerator = enumerable.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
count++;
|
||||
if (count > 100)
|
||||
{
|
||||
_detailsText = "over 100 Elements";
|
||||
return;
|
||||
}
|
||||
}
|
||||
_detailsText = $"{count} Elements";
|
||||
|
||||
rootVisualElement.Q<Label>(name = "generated-count-label").text = _detailsText;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Undo.undoRedoPerformed -= HandleUndoCallback;
|
||||
Undo.RevertAllDownToGroup(_undoStart);
|
||||
foreach (var keyGenerator in _keysGenerators)
|
||||
DestroyImmediate(keyGenerator.Value);
|
||||
}
|
||||
|
||||
private void OnGeneratorClicked(ChangeEvent<bool> evt)
|
||||
{
|
||||
if (!evt.newValue)
|
||||
return;
|
||||
|
||||
SetGeneratorIndex((int)(evt.target as VisualElement).userData);
|
||||
}
|
||||
|
||||
private void HandleUndoCallback()
|
||||
{
|
||||
UpdateGeneratorAndEditorIfNeeded();
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void SetGeneratorIndex(int index)
|
||||
{
|
||||
Undo.RecordObject(this, "Change Window");
|
||||
_selectedIndex = index;
|
||||
UpdateGeneratorAndEditorIfNeeded();
|
||||
}
|
||||
|
||||
private void UpdateGeneratorAndEditorIfNeeded()
|
||||
{
|
||||
var targetType = _generatorsData[_selectedIndex].GeneratorType;
|
||||
if (_generator != null && _generator.GetType() == targetType)
|
||||
return;
|
||||
|
||||
_generator = GetOrCreateKeysGenerator(targetType);
|
||||
if (_editor != null)
|
||||
DestroyImmediate(_editor);
|
||||
_editor = UnityEditor.Editor.CreateEditor(_generator);
|
||||
|
||||
UpdateDetailsText();
|
||||
}
|
||||
|
||||
private KeyListGenerator GetOrCreateKeysGenerator(Type type)
|
||||
{
|
||||
if (!_keysGenerators.ContainsKey(type))
|
||||
{
|
||||
var so = (KeyListGenerator)CreateInstance(type);
|
||||
so.hideFlags = HideFlags.DontSave;
|
||||
_keysGenerators.Add(type, so);
|
||||
}
|
||||
return _keysGenerators[type];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df07fe6d161e3334083f837a066dd949
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace AYellowpaper.SerializedCollections
|
||||
{
|
||||
public enum ModificationType
|
||||
{
|
||||
None,
|
||||
Add,
|
||||
Remove,
|
||||
Confine,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc2030edc0a04b74a8642773bd8c98fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor
|
||||
{
|
||||
public class PagingElement
|
||||
{
|
||||
public int Page
|
||||
{
|
||||
get => _page;
|
||||
set
|
||||
{
|
||||
_page = value;
|
||||
EnsureValidPageIndex();
|
||||
}
|
||||
}
|
||||
public int PageCount
|
||||
{
|
||||
get => _pageCount;
|
||||
set
|
||||
{
|
||||
Debug.Assert(value >= 1, $"{nameof(PageCount)} needs to be 1 or larger but is {value}.");
|
||||
_pageCount = value;
|
||||
EnsureValidPageIndex();
|
||||
}
|
||||
}
|
||||
|
||||
private const int buttonWidth = 20;
|
||||
private const int inputWidth = 20;
|
||||
private const int labelWidth = 30;
|
||||
|
||||
private int _page = 1;
|
||||
private int _pageCount = 1;
|
||||
|
||||
public PagingElement(int pageCount = 1)
|
||||
{
|
||||
PageCount = pageCount;
|
||||
}
|
||||
|
||||
public float GetDesiredWidth()
|
||||
{
|
||||
return buttonWidth * 2 + inputWidth + labelWidth;
|
||||
}
|
||||
|
||||
public void OnGUI(Rect rect)
|
||||
{
|
||||
Rect leftButton = rect.WithXAndWidth(rect.x, buttonWidth);
|
||||
Rect inputRect = leftButton.AppendRight(inputWidth);
|
||||
Rect labelRect = inputRect.AppendRight(labelWidth);
|
||||
Rect rightButton = labelRect.AppendRight(buttonWidth);
|
||||
using (new GUIEnabledScope(Page != 1))
|
||||
if (GUI.Button(leftButton, "<"))
|
||||
Page--;
|
||||
using (new GUIEnabledScope(Page != PageCount))
|
||||
if (GUI.Button(rightButton, ">"))
|
||||
Page++;
|
||||
Page = EditorGUI.IntField(inputRect, Page);
|
||||
GUI.Label(labelRect, "/" + PageCount.ToString());
|
||||
}
|
||||
|
||||
private void EnsureValidPageIndex()
|
||||
{
|
||||
_page = Mathf.Clamp(_page, 1, PageCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f35ac465aece4064582910fc2c206682
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bead4ae311155bd46af1e99788f1d932
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b8ccff4f0c60943b9a54ce8d698d7f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AYellowpaper.SerializedCollections.Editor.Search
|
||||
{
|
||||
public class EnumMatcher : Matcher
|
||||
{
|
||||
public override bool IsMatch(SerializedProperty property)
|
||||
{
|
||||
if (property.propertyType == SerializedPropertyType.Enum && SCEditorUtility.TryGetTypeFromProperty(property, out var type))
|
||||
{
|
||||
foreach (var text in SCEnumUtility.GetEnumCache(type).GetNamesForValue(property.enumValueFlag))
|
||||
{
|
||||
if (text.Contains(SearchString, StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2cf86e71fb0ff04f96ac71dd9961962
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user