247 lines
9.5 KiB
C#
247 lines
9.5 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace Steamworks
|
|
{
|
|
// Token: 0x020016AA RID: 5802
|
|
[Token(Token = "0x20016AA")]
|
|
public sealed class Callback<T> : Callback, IDisposable
|
|
{
|
|
// Token: 0x140000B6 RID: 182
|
|
// (add) Token: 0x060086C1 RID: 34497 RVA: 0x001CBD58 File Offset: 0x001C9F58
|
|
// (remove) Token: 0x060086C2 RID: 34498 RVA: 0x001CBD80 File Offset: 0x001C9F80
|
|
[Token(Token = "0x140000B6")]
|
|
private event Callback<T>.DispatchDelegate m_Func
|
|
{
|
|
[Token(Token = "0x60086C1")]
|
|
[Address(RVA = "0x2FAABA0", Offset = "0x2FA99A0", VA = "0x182FAABA0")]
|
|
[CompilerGenerated]
|
|
add
|
|
{
|
|
Callback.DispatchDelegate func;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
func = this.m_Func;
|
|
@delegate = Delegate.Combine(func, value);
|
|
if (@delegate == 0)
|
|
{
|
|
}
|
|
}
|
|
while (@delegate == 0);
|
|
while (@delegate != func)
|
|
{
|
|
}
|
|
}
|
|
[Token(Token = "0x60086C2")]
|
|
[Address(RVA = "0x2FAAC60", Offset = "0x2FA9A60", VA = "0x182FAAC60")]
|
|
[CompilerGenerated]
|
|
remove
|
|
{
|
|
Callback.DispatchDelegate func;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
func = this.m_Func;
|
|
@delegate = Delegate.Remove(func, value);
|
|
if (@delegate == 0)
|
|
{
|
|
}
|
|
}
|
|
while (@delegate == 0);
|
|
while (@delegate != func)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060086C3 RID: 34499 RVA: 0x001CBDA8 File Offset: 0x001C9FA8
|
|
[Token(Token = "0x60086C3")]
|
|
[Address(RVA = "0x2FAADF0", Offset = "0x2FA9BF0", VA = "0x182FAADF0")]
|
|
public static Callback<T> Create(Callback<T>.DispatchDelegate func)
|
|
{
|
|
int num;
|
|
Callback callback = new Callback(func, num != 0);
|
|
num = 0;
|
|
return callback;
|
|
}
|
|
|
|
// Token: 0x060086C4 RID: 34500 RVA: 0x001CBDC0 File Offset: 0x001C9FC0
|
|
[Token(Token = "0x60086C4")]
|
|
[Address(RVA = "0x2FAAD20", Offset = "0x2FA9B20", VA = "0x182FAAD20")]
|
|
public static Callback<T> CreateGameServer(Callback<T>.DispatchDelegate func)
|
|
{
|
|
return new Callback(func, true);
|
|
}
|
|
|
|
// Token: 0x060086C5 RID: 34501 RVA: 0x001CBDD4 File Offset: 0x001C9FD4
|
|
[Token(Token = "0x60086C5")]
|
|
[Address(RVA = "0x2FAC3D0", Offset = "0x2FAB1D0", VA = "0x182FAC3D0")]
|
|
public Callback(Callback<T>.DispatchDelegate func, bool bGameServer = false)
|
|
{
|
|
this.m_bGameServer = bGameServer;
|
|
((IDisposable)this).Dispose();
|
|
}
|
|
|
|
// Token: 0x060086C6 RID: 34502 RVA: 0x001CBDFC File Offset: 0x001C9FFC
|
|
[Token(Token = "0x60086C6")]
|
|
[Address(RVA = "0x2FAB2D0", Offset = "0x2FAA0D0", VA = "0x182FAB2D0", Slot = "1")]
|
|
protected override void Finalize()
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
this.Dispose();
|
|
base..ctor();
|
|
}
|
|
while (num != 0);
|
|
}
|
|
|
|
// Token: 0x060086C7 RID: 34503 RVA: 0x001CBE24 File Offset: 0x001CA024
|
|
[Token(Token = "0x60086C7")]
|
|
[Address(RVA = "0x2FAB100", Offset = "0x2FA9F00", VA = "0x182FAB100", Slot = "8")]
|
|
public void Dispose()
|
|
{
|
|
GC.SuppressFinalize(this);
|
|
this.Unregister();
|
|
this.m_bDisposed = true;
|
|
}
|
|
|
|
// Token: 0x060086C8 RID: 34504 RVA: 0x001CBE44 File Offset: 0x001CA044
|
|
[Token(Token = "0x60086C8")]
|
|
[Address(RVA = "0x2FABF70", Offset = "0x2FAAD70", VA = "0x182FABF70")]
|
|
public void Register(Callback<T>.DispatchDelegate func)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060086C8)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Steamworks.Callback`1::Register(Steamworks.Callback`1/DispatchDelegate<T>)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_1F:
|
|
stloc:Exception(var_0_29, newobj:Exception(Exception::.ctor, ldstr:string("Callback function must not be null.")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x060086C9 RID: 34505 RVA: 0x001CBE7C File Offset: 0x001CA07C
|
|
[Token(Token = "0x60086C9")]
|
|
[Address(RVA = "0x2FAC1F0", Offset = "0x2FAAFF0", VA = "0x182FAC1F0")]
|
|
public void Unregister()
|
|
{
|
|
CallbackDispatcher.Unregister(this);
|
|
this.m_bIsRegistered = false;
|
|
}
|
|
|
|
// Token: 0x170016C8 RID: 5832
|
|
// (get) Token: 0x060086CA RID: 34506 RVA: 0x001CBE98 File Offset: 0x001CA098
|
|
[Token(Token = "0x170016C8")]
|
|
public override bool IsGameServer
|
|
{
|
|
[Token(Token = "0x60086CA")]
|
|
[Address(RVA = "0x42C2C0", Offset = "0x42B0C0", VA = "0x18042C2C0", Slot = "4")]
|
|
get
|
|
{
|
|
return this.m_bGameServer;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060086CB RID: 34507 RVA: 0x001CBEAC File Offset: 0x001CA0AC
|
|
[Token(Token = "0x60086CB")]
|
|
[Address(RVA = "0x2FAB5D0", Offset = "0x2FAA3D0", VA = "0x182FAB5D0", Slot = "5")]
|
|
internal override Type GetCallbackType()
|
|
{
|
|
Type type;
|
|
return type;
|
|
}
|
|
|
|
// Token: 0x060086CC RID: 34508 RVA: 0x001CBEBC File Offset: 0x001CA0BC
|
|
[Token(Token = "0x60086CC")]
|
|
[Address(RVA = "0x2FAB800", Offset = "0x2FAA600", VA = "0x182FAB800", Slot = "6")]
|
|
internal override void OnRunCallback(IntPtr pvParam)
|
|
{
|
|
Callback.DispatchDelegate func = this.m_Func;
|
|
Type type;
|
|
object obj = Marshal.PtrToStructure(pvParam, type);
|
|
func(obj);
|
|
}
|
|
|
|
// Token: 0x060086CD RID: 34509 RVA: 0x001CBEEC File Offset: 0x001CA0EC
|
|
[Token(Token = "0x60086CD")]
|
|
[Address(RVA = "0x2FAC1E0", Offset = "0x2FAAFE0", VA = "0x182FAC1E0", Slot = "7")]
|
|
internal override void SetUnregistered()
|
|
{
|
|
this.m_bIsRegistered = false;
|
|
}
|
|
|
|
// Token: 0x0400594C RID: 22860
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x400594C")]
|
|
private bool m_bGameServer;
|
|
|
|
// Token: 0x0400594D RID: 22861
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x400594D")]
|
|
private bool m_bIsRegistered;
|
|
|
|
// Token: 0x0400594E RID: 22862
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x400594E")]
|
|
private bool m_bDisposed;
|
|
|
|
// Token: 0x020016AB RID: 5803
|
|
[Token(Token = "0x20016AB")]
|
|
public sealed class DispatchDelegate : MulticastDelegate
|
|
{
|
|
// Token: 0x060086CE RID: 34510 RVA: 0x001CBF00 File Offset: 0x001CA100
|
|
[Token(Token = "0x60086CE")]
|
|
[Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")]
|
|
public DispatchDelegate(object @object, IntPtr method)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060086CF RID: 34511 RVA: 0x001CBF10 File Offset: 0x001CA110
|
|
[Token(Token = "0x60086CF")]
|
|
[Address(RVA = "0x2FAC660", Offset = "0x2FAB460", VA = "0x182FAC660", Slot = "13")]
|
|
public void Invoke(T param)
|
|
{
|
|
uint num;
|
|
if (num != (uint)0)
|
|
{
|
|
throw new ExecutionEngineException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060086D0 RID: 34512 RVA: 0x001CBF80 File Offset: 0x001CA180
|
|
[Token(Token = "0x60086D0")]
|
|
[Address(RVA = "0x2FAC560", Offset = "0x2FAB360", VA = "0x182FAC560", Slot = "14")]
|
|
public IAsyncResult BeginInvoke(T param, AsyncCallback callback, object @object)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060086D1 RID: 34513 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x60086D1")]
|
|
[Address(RVA = "0x448B70", Offset = "0x447970", VA = "0x180448B70", Slot = "15")]
|
|
public void EndInvoke(IAsyncResult result)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
}
|
|
}
|