Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/Steamworks/Callback.2.cs
T
2026-04-08 23:40:05 +02:00

251 lines
9.6 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace Steamworks
{
// Token: 0x0200108B RID: 4235
[Token(Token = "0x200108B")]
[StructLayout(3)]
public sealed class Callback<T> : Callback, IDisposable
{
// Token: 0x140000A2 RID: 162
// (add) Token: 0x06006748 RID: 26440 RVA: 0x0016A4E8 File Offset: 0x001686E8
// (remove) Token: 0x06006749 RID: 26441 RVA: 0x0016A510 File Offset: 0x00168710
[Token(Token = "0x140000A2")]
private event Callback<T>.DispatchDelegate m_Func
{
[Token(Token = "0x6006748")]
[Address(RVA = "0x2314DA0", Offset = "0x23137A0", VA = "0x182314DA0")]
[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 = "0x6006749")]
[Address(RVA = "0x2314E60", Offset = "0x2313860", VA = "0x182314E60")]
[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: 0x0600674A RID: 26442 RVA: 0x0016A538 File Offset: 0x00168738
[Token(Token = "0x600674A")]
[Address(RVA = "0x2314FF0", Offset = "0x23139F0", VA = "0x182314FF0")]
public static Callback<T> Create(Callback<T>.DispatchDelegate func)
{
int num;
Callback callback = new Callback(func, num != 0);
num = 0;
return callback;
}
// Token: 0x0600674B RID: 26443 RVA: 0x0016A550 File Offset: 0x00168750
[Token(Token = "0x600674B")]
[Address(RVA = "0x2314F20", Offset = "0x2313920", VA = "0x182314F20")]
public static Callback<T> CreateGameServer(Callback<T>.DispatchDelegate func)
{
return new Callback(func, true);
}
// Token: 0x0600674C RID: 26444 RVA: 0x0016A564 File Offset: 0x00168764
[Token(Token = "0x600674C")]
[Address(RVA = "0x2316670", Offset = "0x2315070", VA = "0x182316670")]
public Callback(Callback<T>.DispatchDelegate func, bool bGameServer = false)
{
this.m_bGameServer = bGameServer;
((IDisposable)this).Dispose();
}
// Token: 0x0600674D RID: 26445 RVA: 0x0016A58C File Offset: 0x0016878C
[Token(Token = "0x600674D")]
[Address(RVA = "0x2315510", Offset = "0x2313F10", VA = "0x182315510", Slot = "1")]
protected override void Finalize()
{
int num;
do
{
num = 0;
this.Dispose();
base..ctor();
if (num != -1)
{
}
}
while (num != 0);
}
// Token: 0x0600674E RID: 26446 RVA: 0x0016A5B8 File Offset: 0x001687B8
[Token(Token = "0x600674E")]
[Address(RVA = "0x2315300", Offset = "0x2313D00", VA = "0x182315300", Slot = "8")]
public void Dispose()
{
GC.SuppressFinalize(this);
this.Unregister();
this.m_bDisposed = true;
}
// Token: 0x0600674F RID: 26447 RVA: 0x0016A5D8 File Offset: 0x001687D8
[Token(Token = "0x600674F")]
[Address(RVA = "0x2316210", Offset = "0x2314C10", VA = "0x182316210")]
public void Register(Callback<T>.DispatchDelegate func)
{
/*
An exception occurred when decompiling this method (0600674F)
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 1663
*/;
}
// Token: 0x06006750 RID: 26448 RVA: 0x0016A610 File Offset: 0x00168810
[Token(Token = "0x6006750")]
[Address(RVA = "0x2316490", Offset = "0x2314E90", VA = "0x182316490")]
public void Unregister()
{
CallbackDispatcher.Unregister(this);
this.m_bIsRegistered = false;
}
// Token: 0x17001285 RID: 4741
// (get) Token: 0x06006751 RID: 26449 RVA: 0x0016A62C File Offset: 0x0016882C
[Token(Token = "0x17001285")]
public override bool IsGameServer
{
[Token(Token = "0x6006751")]
[Address(RVA = "0x4FBF40", Offset = "0x4FA940", VA = "0x1804FBF40", Slot = "4")]
get
{
return this.m_bGameServer;
}
}
// Token: 0x06006752 RID: 26450 RVA: 0x0016A640 File Offset: 0x00168840
[Token(Token = "0x6006752")]
[Address(RVA = "0x2315870", Offset = "0x2314270", VA = "0x182315870", Slot = "5")]
internal override Type GetCallbackType()
{
Type type;
return type;
}
// Token: 0x06006753 RID: 26451 RVA: 0x0016A650 File Offset: 0x00168850
[Token(Token = "0x6006753")]
[Address(RVA = "0x2315AA0", Offset = "0x23144A0", VA = "0x182315AA0", 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: 0x06006754 RID: 26452 RVA: 0x0016A680 File Offset: 0x00168880
[Token(Token = "0x6006754")]
[Address(RVA = "0x2316480", Offset = "0x2314E80", VA = "0x182316480", Slot = "7")]
internal override void SetUnregistered()
{
this.m_bIsRegistered = false;
}
// Token: 0x04004971 RID: 18801
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4004971")]
private bool m_bGameServer;
// Token: 0x04004972 RID: 18802
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4004972")]
private bool m_bIsRegistered;
// Token: 0x04004973 RID: 18803
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4004973")]
private bool m_bDisposed;
// Token: 0x0200108C RID: 4236
[Token(Token = "0x200108C")]
public sealed class DispatchDelegate : MulticastDelegate
{
// Token: 0x06006755 RID: 26453 RVA: 0x0016A694 File Offset: 0x00168894
[Token(Token = "0x6006755")]
[Address(RVA = "0x3E5170", Offset = "0x3E3B70", VA = "0x1803E5170")]
public DispatchDelegate(object @object, IntPtr method)
{
}
// Token: 0x06006756 RID: 26454 RVA: 0x0016A6A4 File Offset: 0x001688A4
[Token(Token = "0x6006756")]
[Address(RVA = "0x2316CB0", Offset = "0x23156B0", VA = "0x182316CB0", Slot = "13")]
public void Invoke(T param)
{
uint num;
if (num != (uint)0)
{
throw new ExecutionEngineException();
}
}
// Token: 0x06006757 RID: 26455 RVA: 0x0016A724 File Offset: 0x00168924
[Token(Token = "0x6006757")]
[Address(RVA = "0x2316800", Offset = "0x2315200", VA = "0x182316800", Slot = "14")]
public IAsyncResult BeginInvoke(T param, AsyncCallback callback, object @object)
{
}
// Token: 0x06006758 RID: 26456 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6006758")]
[Address(RVA = "0x40BFF0", Offset = "0x40A9F0", VA = "0x18040BFF0", Slot = "15")]
public void EndInvoke(IAsyncResult result)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
}
}
}