scripts
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
// Token: 0x020000DB RID: 219
|
||||
internal sealed class WeakObjectWrapperComparer : EqualityComparer<WeakObjectWrapper>
|
||||
{
|
||||
// Token: 0x0600075E RID: 1886 RVA: 0x00013D78 File Offset: 0x00011F78
|
||||
public override bool Equals(WeakObjectWrapper x, WeakObjectWrapper y)
|
||||
{
|
||||
if (x == null && y == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (x == null || y == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
WeakReference weak = x.Weak;
|
||||
WeakReference weak2 = y.Weak;
|
||||
return (weak.IsAlive || weak2.IsAlive) && weak.Target == weak2.Target;
|
||||
}
|
||||
|
||||
// Token: 0x0600075F RID: 1887 RVA: 0x00013DD8 File Offset: 0x00011FD8
|
||||
public override int GetHashCode(WeakObjectWrapper obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return obj.TargetHashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user