scripts
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Threading
|
||||
{
|
||||
/// <summary>Defines the lock that implements single-writer/multiple-reader semantics. This is a value type.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000612 RID: 1554
|
||||
[ComVisible(true)]
|
||||
public struct LockCookie
|
||||
{
|
||||
// Token: 0x060038CC RID: 14540 RVA: 0x000C42BC File Offset: 0x000C24BC
|
||||
internal LockCookie(int thread_id)
|
||||
{
|
||||
this.ThreadId = thread_id;
|
||||
this.ReaderLocks = 0;
|
||||
this.WriterLocks = 0;
|
||||
}
|
||||
|
||||
// Token: 0x060038CD RID: 14541 RVA: 0x000C42D4 File Offset: 0x000C24D4
|
||||
internal LockCookie(int thread_id, int reader_locks, int writer_locks)
|
||||
{
|
||||
this.ThreadId = thread_id;
|
||||
this.ReaderLocks = reader_locks;
|
||||
this.WriterLocks = writer_locks;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x060038CE RID: 14542 RVA: 0x000C42EC File Offset: 0x000C24EC
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Threading.LockCookie" />.</summary>
|
||||
/// <returns>true if <paramref name="obj" /> is equal to the value of the current instance; otherwise, false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Threading.LockCookie" /> to compare to the current instance.</param>
|
||||
// Token: 0x060038CF RID: 14543 RVA: 0x000C4300 File Offset: 0x000C2500
|
||||
public bool Equals(LockCookie obj)
|
||||
{
|
||||
return this.ThreadId == obj.ThreadId && this.ReaderLocks == obj.ReaderLocks && this.WriterLocks == obj.WriterLocks;
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether a specified object is a <see cref="T:System.Threading.LockCookie" /> and is equal to the current instance.</summary>
|
||||
/// <returns>true if the value of <paramref name="obj" /> is equal to the value of the current instance; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to compare to the current instance.</param>
|
||||
// Token: 0x060038D0 RID: 14544 RVA: 0x000C433C File Offset: 0x000C253C
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is LockCookie && obj.Equals(this);
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether two <see cref="T:System.Threading.LockCookie" /> structures are equal.</summary>
|
||||
/// <returns>true if <paramref name="a" /> is equal to <paramref name="b" />; otherwise, false.</returns>
|
||||
/// <param name="a">The <see cref="T:System.Threading.LockCookie" /> to compare to <paramref name="b" />.</param>
|
||||
/// <param name="b">The <see cref="T:System.Threading.LockCookie" /> to compare to <paramref name="a" />.</param>
|
||||
// Token: 0x060038D1 RID: 14545 RVA: 0x000C435C File Offset: 0x000C255C
|
||||
public static bool operator ==(LockCookie a, LockCookie b)
|
||||
{
|
||||
return a.Equals(b);
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether two <see cref="T:System.Threading.LockCookie" /> structures are not equal.</summary>
|
||||
/// <returns>true if <paramref name="a" /> is not equal to <paramref name="b" />; otherwise, false.</returns>
|
||||
/// <param name="a">The <see cref="T:System.Threading.LockCookie" /> to compare to <paramref name="b" />.</param>
|
||||
/// <param name="b">The <see cref="T:System.Threading.LockCookie" /> to compare to <paramref name="a" />.</param>
|
||||
// Token: 0x060038D2 RID: 14546 RVA: 0x000C4368 File Offset: 0x000C2568
|
||||
public static bool operator !=(LockCookie a, LockCookie b)
|
||||
{
|
||||
return !a.Equals(b);
|
||||
}
|
||||
|
||||
// Token: 0x040016EC RID: 5868
|
||||
internal int ThreadId;
|
||||
|
||||
// Token: 0x040016ED RID: 5869
|
||||
internal int ReaderLocks;
|
||||
|
||||
// Token: 0x040016EE RID: 5870
|
||||
internal int WriterLocks;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user