NativeMonitorLock 结构
Native monitorLock
命名空间: NativeCollections
程序集: Fantasy.Net.dll
语法
[StructLayout(LayoutKind.Sequential)]
public struct NativeMonitorLock : IDisposable, IEquatable<NativeMonitorLock>
构造函数
| 编辑本文 查看源代码NativeMonitorLock(object)
Structure
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public NativeMonitorLock(object value)
参数
类型 | 名称 | 描述 |
---|---|---|
object | value | Value |
NativeMonitorLock(object, GCHandleType)
Structure
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public NativeMonitorLock(object value, GCHandleType type)
参数
类型 | 名称 | 描述 |
---|---|---|
object | value | Value |
GCHandleType | type | GCHandle type |
NativeMonitorLock(GCHandleType)
Structure
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public NativeMonitorLock(GCHandleType type)
参数
类型 | 名称 | 描述 |
---|---|---|
GCHandleType | type | GCHandle type |
属性
| 编辑本文 查看源代码Empty
Empty
声明
public static NativeMonitorLock Empty { get; }
属性值
类型 | 描述 |
---|---|
NativeMonitorLock |
IsCreated
Is created
声明
public bool IsCreated { get; }
属性值
类型 | 描述 |
---|---|
bool |
方法
| 编辑本文 查看源代码Dispose()
Dispose
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Dispose()
Enter()
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enter()
Enter(ref bool)
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enter(ref bool lockTaken)
参数
类型 | 名称 | 描述 |
---|---|---|
bool | lockTaken |
Equals(NativeMonitorLock)
Equals
声明
public bool Equals(NativeMonitorLock other)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMonitorLock | other | Other |
返回
类型 | 描述 |
---|---|
bool | Equals |
Equals(object?)
Equals
声明
public override bool Equals(object? obj)
参数
类型 | 名称 | 描述 |
---|---|---|
object | obj | object |
返回
类型 | 描述 |
---|---|
bool | Equals |
重写
| 编辑本文 查看源代码Exit()
Exit
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Exit()
GetHashCode()
Get hashCode
声明
public override int GetHashCode()
返回
类型 | 描述 |
---|---|
int | HashCode |
重写
| 编辑本文 查看源代码IsEntered()
Is entered
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool IsEntered()
返回
类型 | 描述 |
---|---|
bool |
Pulse()
Pulse
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Pulse()
PulseAll()
Pulse all
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void PulseAll()
ToString()
To string
声明
public override string ToString()
返回
类型 | 描述 |
---|---|
string | String |
重写
| 编辑本文 查看源代码TryEnter()
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryEnter()
返回
类型 | 描述 |
---|---|
bool |
TryEnter(ref bool)
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryEnter(ref bool lockTaken)
参数
类型 | 名称 | 描述 |
---|---|---|
bool | lockTaken |
TryEnter(int)
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryEnter(int millisecondsTimeout)
参数
类型 | 名称 | 描述 |
---|---|---|
int | millisecondsTimeout |
返回
类型 | 描述 |
---|---|
bool |
TryEnter(int, ref bool)
Enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryEnter(int millisecondsTimeout, ref bool lockTaken)
参数
类型 | 名称 | 描述 |
---|---|---|
int | millisecondsTimeout | |
bool | lockTaken |
TryEnter(TimeSpan)
Try enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryEnter(TimeSpan timeout)
参数
类型 | 名称 | 描述 |
---|---|---|
TimeSpan | timeout |
返回
类型 | 描述 |
---|---|
bool |
TryEnter(TimeSpan, ref bool)
Try enter
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryEnter(TimeSpan timeout, ref bool lockTaken)
参数
类型 | 名称 | 描述 |
---|---|---|
TimeSpan | timeout | |
bool | lockTaken |
Wait()
Wait
声明
[UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Wait()
返回
类型 | 描述 |
---|---|
bool |
Wait(int)
Wait
声明
[UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Wait(int millisecondsTimeout)
参数
类型 | 名称 | 描述 |
---|---|---|
int | millisecondsTimeout |
返回
类型 | 描述 |
---|---|
bool |
Wait(int, bool)
Wait
声明
[UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Wait(int millisecondsTimeout, bool exitContext)
参数
类型 | 名称 | 描述 |
---|---|---|
int | millisecondsTimeout | |
bool | exitContext |
返回
类型 | 描述 |
---|---|
bool |
Wait(TimeSpan)
Wait
声明
[UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Wait(TimeSpan timeout)
参数
类型 | 名称 | 描述 |
---|---|---|
TimeSpan | timeout |
返回
类型 | 描述 |
---|---|
bool |
Wait(TimeSpan, bool)
Wait
声明
[UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Wait(TimeSpan timeout, bool exitContext)
参数
类型 | 名称 | 描述 |
---|---|---|
TimeSpan | timeout | |
bool | exitContext |
返回
类型 | 描述 |
---|---|
bool |
运算符
| 编辑本文 查看源代码operator ==(NativeMonitorLock, NativeMonitorLock)
Equals
声明
public static bool operator ==(NativeMonitorLock left, NativeMonitorLock right)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMonitorLock | left | Left |
NativeMonitorLock | right | Right |
返回
类型 | 描述 |
---|---|
bool | Equals |
operator !=(NativeMonitorLock, NativeMonitorLock)
Not equals
声明
public static bool operator !=(NativeMonitorLock left, NativeMonitorLock right)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMonitorLock | left | Left |
NativeMonitorLock | right | Right |
返回
类型 | 描述 |
---|---|
bool | Not equals |