12[DebuggerDisplay(
"{ToString(),raw}")]
32 ref T ptr = ref
Unsafe.NullRef<T>();
37 if (typeof(T) == typeof(
char) && @
object.GetType() == typeof(
string))
39 ptr = ref
Unsafe.As<char, T>(ref
Unsafe.As<
string>(@object).GetRawStringData());
53 nuint num = (uint)
_index & 0x7FFFFFFFu;
55 if ((ulong)((long)num + (
long)(uint)
length2) > (ulong)(uint)
length)
74 if (!typeof(T).IsValueType &&
array.GetType() != typeof(T[]))
95 if (!typeof(T).IsValueType &&
array.GetType() != typeof(T[]))
120 if (!typeof(T).IsValueType &&
array.GetType() != typeof(T[]))
124 if ((ulong)((
long)(uint)
start + (
long)(uint)
length) > (ulong)(uint)
array.Length)
182 if (typeof(T) == typeof(
char))
190 return $
"System.Memory<{typeof(T).Name}>[{_length}]";
228 if (typeof(T) == typeof(
char) && @
object is
string text)
255 public override bool Equals([NotNullWhen(
true)]
object?
obj)
259 return readOnlyMemory.Equals(
this);
static int GetHashCode(object? o)
static unsafe bool ObjectHasComponentSize(object obj)
static unsafe ref byte GetArrayDataReference(Array array)
static void ThrowArrayTypeMismatchException()
static void ThrowArgumentOutOfRangeException(System.ExceptionArgument argument)
Memory(T[]? array, int start, int length)
unsafe MemoryHandle Pin()
Memory(T[] array, int start)
Memory< T > Slice(int start, int length)
Memory(MemoryManager< T > manager, int length)
override int GetHashCode()
bool TryCopyTo(Memory< T > destination)
Memory< T > Slice(int start)
override bool Equals([NotNullWhen(true)] object? obj)
bool Equals(Memory< T > other)
override string ToString()
void CopyTo(Memory< T > destination)
Memory(object obj, int start, int length)
Memory(MemoryManager< T > manager, int start, int length)
static GCHandle Alloc(object? value)
void CopyTo(Span< T > destination)
override string ToString()
bool TryCopyTo(Span< T > destination)