Skip to content

EngineCommon ​

AnyStructView 双端 ​

命名空间 EngineCommon

csharp
public struct AnyStructView

构造函数 ​

AnyStructView 双端 ​

csharp
public AnyStructView()

方法 ​

Assign 双端 ​

csharp
public void Assign<T>(StructView<T> other) where T : struct

ArrayView 双端 ​

命名空间 EngineCommon

csharp
public struct ArrayView<T> where T : struct

交互用数组视图

构造函数 ​

ArrayView 双端 ​

csharp
public ArrayView(T[]? array, GCPinner? pinner = null)

方法 ​

Create 双端 ​

csharp
public static ArrayView<T> Create(int length, GCPinner? pinner = null)

字段 ​

ptr 双端 ​

csharp
public readonly ulong ptr

length 双端 ​

csharp
public readonly long length

索引器 ​

this[] 双端 ​

csharp

ArrayViewRef 双端 ​

命名空间 EngineCommon

csharp
public ref struct ArrayViewRef<T> where T : unmanaged

交互用数组视图 (引用版本)

构造函数 ​

ArrayViewRef 双端 ​

csharp
public ArrayViewRef(T[]? array)

ArrayViewRef 双端 ​

csharp
public ArrayViewRef(ReadOnlySpan<T> span)

ArrayViewRef 双端 ​

csharp
public ArrayViewRef(List<T>? list)

方法 ​

implicit operator 双端 ​

csharp
public static ArrayViewRef<T> implicit operator(T[]? array)

implicit operator 双端 ​

csharp
public static ArrayViewRef<T> implicit operator(List<T>? list)

字段 ​

reference 双端 ​

csharp
public readonly ref T reference

length 双端 ​

csharp
public readonly long length

索引器 ​

this[] 双端 ​

csharp

GCPinner 双端 ​

命名空间 EngineCommon

csharp
public class GCPinner : IDisposable

用于防止GC的内存固定器

方法 ​

Dispose 双端 ​

csharp
public void Dispose()

Create 双端 ​

csharp
public static GCPinner Create()

Pin 双端 ​

csharp
public GCHandle Pin<T>(in T data) where T : struct

Pin 双端 ​

csharp
public GCHandle Pin(in UTF8String str)

Pin 双端 ​

csharp
public GCHandle Pin<T>(T[]? array) where T : struct

Pin 双端 ​

csharp
public GCHandle Pin<T>(T? obj) where T : class

UnpinAll 双端 ​

csharp
public void UnpinAll()

NativePtr 双端 ​

命名空间 EngineCommon

csharp
public readonly struct NativePtr : IEquatable<NativePtr>

构造函数 ​

NativePtr 双端 ​

csharp
public NativePtr(nint nativePtr)

属性 ​

IsNull 双端 ​

csharp
public bool IsNull { get; }

Zero 双端 ​

csharp
public static NativePtr Zero { get; }

方法 ​

GetHashCode 双端 ​

csharp
public override int GetHashCode()

ToString 双端 ​

csharp
public override string ToString()

operator != 双端 ​

csharp
public static bool operator !=(NativePtr left, NativePtr right)

operator == 双端 ​

csharp
public static bool operator ==(NativePtr left, NativePtr right)

Equals 双端 ​

csharp
public override bool Equals(object obj)

Equals 双端 ​

csharp
public bool Equals(NativePtr other)

SequentialPair 双端 ​

命名空间 EngineCommon

csharp
public struct SequentialPair<K, V>

构造函数 ​

SequentialPair 双端 ​

csharp
public SequentialPair(K key, V value)

字段 ​

Key 双端 ​

csharp
public K Key

Value 双端 ​

csharp
public V Value

SpanMarshal 双端 ​

命名空间 EngineCommon

csharp
public static class SpanMarshal

方法 ​

AsBytes 双端 ​

csharp
public static ReadOnlySpan<byte> AsBytes<T>(this ref T t) where T : unmanaged

AsBytes 双端 ​

csharp
public static ReadOnlySpan<byte> AsBytes<T>(this ReadOnlySpan<T> span) where T : unmanaged

As 双端 ​

csharp
public static T As<T>(this byte[] bytes) where T : unmanaged

As 双端 ​

csharp
public static T As<T>(this Span<byte> span) where T : unmanaged

AsNullable 双端 ​

csharp
public static T? AsNullable<T>(this byte[] bytes) where T : unmanaged

AsNullable 双端 ​

csharp
public static T? AsNullable<T>(this Span<byte> span) where T : unmanaged

AsNullable 双端 ​

csharp
public static T? AsNullable<T>(this ReadOnlySpan<byte> span) where T : unmanaged

As 双端 ​

csharp
public static T As<T>(this ReadOnlySpan<byte> span) where T : unmanaged

As 双端 ​

csharp
public static T As<T>(this Span<byte> span, int starting) where T : unmanaged

As 双端 ​

csharp
public static T As<T>(this ReadOnlySpan<byte> span, int starting) where T : unmanaged

MarshalAs 双端 ​

csharp
public static T MarshalAs<T>(this double value) where T : unmanaged

AsSpan 双端 ​

csharp
public static ReadOnlySpan<T> AsSpan<T>(this ReadOnlySpan<byte> span) where T : unmanaged

AsBytes 双端 ​

csharp
public static Span<byte> AsBytes<T>(this Span<T> span) where T : unmanaged

AsSpan 双端 ​

csharp
public static Span<T> AsSpan<T>(this Span<byte> span) where T : unmanaged

Append 双端 ​

csharp
public static byte[] Append<T>(this ReadOnlySpan<byte> bytes, ref T value) where T : unmanaged

Prepend 双端 ​

csharp
public static byte[] Prepend<T>(this ReadOnlySpan<byte> bytes, ref T value) where T : unmanaged

Append 双端 ​

csharp
public static byte[] Append<T>(this ref T t, ReadOnlySpan<byte> span) where T : unmanaged

Prepend 双端 ​

csharp
public static byte[] Prepend<T>(this ref T t, ReadOnlySpan<byte> span) where T : unmanaged

Read 双端 ​

csharp
public static T Read<T>(this ref ReadOnlySpan<byte> bytes) where T : unmanaged

Write 双端 ​

csharp
public static void Write<T>(this ref Span<byte> bytes, T value) where T : unmanaged

StructView 双端 ​

命名空间 EngineCommon

csharp
public struct StructView<T> where T : struct

交互用结构体视图

构造函数 ​

StructView 双端 ​

csharp
public StructView(in T data, GCPinner? pinner)

属性 ​

Data 双端 ​

csharp
public readonly ref T Data { get; }

方法 ​

Create 双端 ​

csharp
public static StructView<T> Create(GCPinner? pinner = null)

implicit operator 双端 ​

csharp
public static bool implicit operator(StructView<T> data)

字段 ​

ptr 双端 ​

csharp
public readonly ulong ptr

size 双端 ​

csharp
public readonly long size

UTF8String 双端 ​

命名空间 EngineCommon

csharp
public readonly struct UTF8String : IEquatable<UTF8String>

构造函数 ​

UTF8String 双端 ​

csharp
public UTF8String(byte[] bytes)

UTF8String 双端 ​

csharp
public UTF8String(ReadOnlySpan<byte> span)

UTF8String 双端 ​

csharp
public UTF8String(string? unicode)

UTF8String 双端 ​

csharp
public UTF8String(ReadOnlySpan<char> unicodeCharSpan)

UTF8String 双端 ​

csharp
public UTF8String(UTF8String str)

属性 ​

IsNullOrEmpty 双端 ​

csharp
public bool IsNullOrEmpty { get; }

Length 双端 ​

csharp
public int Length { get; }

Empty 双端 ​

csharp
public static UTF8String Empty { get; }

方法 ​

ToString 双端 ​

csharp
public override string ToString()

ToRawString 双端 ​

csharp
public string ToRawString()

转换为内存布局不变的原生字符串

FromRawString 双端 ​

csharp
public static UTF8String FromRawString(string rawString)

AsSpan 双端 ​

csharp
public ReadOnlySpan<byte> AsSpan()

Equals 双端 ​

csharp
public bool Equals(UTF8String other)

operator == 双端 ​

csharp
public static bool operator ==(UTF8String left, UTF8String right)

operator != 双端 ​

csharp
public static bool operator !=(UTF8String left, UTF8String right)

implicit operator 双端 ​

csharp
public static UTF8String implicit operator(byte[] bytes)

implicit operator 双端 ​

csharp
public static UTF8String implicit operator(ReadOnlySpan<byte> span)

implicit operator 双端 ​

csharp
public static UTF8String implicit operator(string? unicode)

implicit operator 双端 ​

csharp
public static UTF8String implicit operator(ReadOnlySpan<char> unicodeCharSpan)

implicit operator 双端 ​

csharp
public static byte[]? implicit operator(UTF8String str)

Equals 双端 ​

csharp
public override bool Equals(object? obj)

GetHashCode 双端 ​

csharp
public override int GetHashCode()

字段 ​

Bytes 双端 ​

csharp
public readonly byte[]? Bytes

UTF8StringView 双端 ​

命名空间 EngineCommon

csharp
public struct UTF8StringView

交互用UTF8字符串视图

构造函数 ​

UTF8StringView 双端 ​

csharp
public UTF8StringView(UTF8String str, GCPinner? pinner = null)

UTF8StringView 双端 ​

csharp
public UTF8StringView(byte[]? str, GCPinner? pinner = null)

字段 ​

ptr 双端 ​

csharp
public readonly ulong ptr

length 双端 ​

csharp
public readonly long length

UTF8StringViewRef 双端 ​

命名空间 EngineCommon

csharp
public ref struct UTF8StringViewRef

交互用UTF8字符串视图(引用版)

构造函数 ​

UTF8StringViewRef 双端 ​

csharp
public UTF8StringViewRef(UTF8String str)

UTF8StringViewRef 双端 ​

csharp
public UTF8StringViewRef(byte[]? str)

方法 ​

implicit operator 双端 ​

csharp
public static UTF8StringViewRef implicit operator(UTF8String str)

字段 ​

reference 双端 ​

csharp
public readonly ref byte reference

length 双端 ​

csharp
public readonly long length