Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/Steamworks/CallResult.2.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

254 lines
9.9 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace Steamworks
{
// Token: 0x0200178D RID: 6029
[Token(Token = "0x200178D")]
public sealed class CallResult<T> : CallResult, IDisposable
{
// Token: 0x140000B7 RID: 183
// (add) Token: 0x06008AA4 RID: 35492 RVA: 0x001D509C File Offset: 0x001D329C
// (remove) Token: 0x06008AA5 RID: 35493 RVA: 0x001D50C4 File Offset: 0x001D32C4
[Token(Token = "0x140000B7")]
private event CallResult<T>.APIDispatchDelegate m_Func
{
[Token(Token = "0x6008AA4")]
[Address(RVA = "0x32CF670", Offset = "0x32CE670", VA = "0x1832CF670")]
[CompilerGenerated]
add
{
CallResult.APIDispatchDelegate func;
Delegate @delegate;
do
{
func = this.m_Func;
@delegate = Delegate.Combine(func, value);
if (@delegate == 0)
{
}
}
while (@delegate == 0);
while (@delegate != func)
{
}
}
[Token(Token = "0x6008AA5")]
[Address(RVA = "0x32CF730", Offset = "0x32CE730", VA = "0x1832CF730")]
[CompilerGenerated]
remove
{
CallResult.APIDispatchDelegate func;
Delegate @delegate;
do
{
func = this.m_Func;
@delegate = Delegate.Remove(func, value);
if (@delegate == 0)
{
}
}
while (@delegate == 0);
while (@delegate != func)
{
}
}
}
// Token: 0x17001766 RID: 5990
// (get) Token: 0x06008AA6 RID: 35494 RVA: 0x001D50EC File Offset: 0x001D32EC
[Token(Token = "0x17001766")]
public SteamAPICall_t Handle
{
[Token(Token = "0x6008AA6")]
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
get
{
return this.m_hAPICall;
}
}
// Token: 0x06008AA7 RID: 35495 RVA: 0x001D5100 File Offset: 0x001D3300
[Token(Token = "0x6008AA7")]
[Address(RVA = "0x32CEF90", Offset = "0x32CDF90", VA = "0x1832CEF90")]
public static CallResult<T> Create([Optional] CallResult<T>.APIDispatchDelegate func)
{
return new CallResult(func);
}
// Token: 0x06008AA8 RID: 35496 RVA: 0x001D5114 File Offset: 0x001D3314
[Token(Token = "0x6008AA8")]
[Address(RVA = "0x32CF5F0", Offset = "0x32CE5F0", VA = "0x1832CF5F0")]
public CallResult([Optional] CallResult<T>.APIDispatchDelegate func)
{
SteamAPICall_t invalid = SteamAPICall_t.Invalid;
this.m_hAPICall = invalid;
base..ctor();
this.m_Func = func;
}
// Token: 0x06008AA9 RID: 35497 RVA: 0x001D513C File Offset: 0x001D333C
[Token(Token = "0x6008AA9")]
[Address(RVA = "0x32CF0E0", Offset = "0x32CE0E0", VA = "0x1832CF0E0", Slot = "1")]
protected override void Finalize()
{
int num;
do
{
num = 0;
this.Dispose();
base..ctor();
}
while (num != 0);
}
// Token: 0x06008AAA RID: 35498 RVA: 0x001D5164 File Offset: 0x001D3364
[Token(Token = "0x6008AAA")]
[Address(RVA = "0x32CF060", Offset = "0x32CE060", VA = "0x1832CF060", Slot = "7")]
public void Dispose()
{
GC.SuppressFinalize(this);
this.Cancel();
this.m_bDisposed = true;
}
// Token: 0x06008AAB RID: 35499 RVA: 0x001D5184 File Offset: 0x001D3384
[Token(Token = "0x6008AAB")]
[Address(RVA = "0x32CF470", Offset = "0x32CE470", VA = "0x1832CF470")]
public void Set(SteamAPICall_t hAPICall, [Optional] CallResult<T>.APIDispatchDelegate func)
{
/*
An exception occurred when decompiling this method (06008AAB)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Steamworks.CallResult`1::Set(Steamworks.SteamAPICall_t,Steamworks.CallResult`1/APIDispatchDelegate<T>)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_56:
stloc:Exception(var_3_60, newobj:Exception(Exception::.ctor, ldstr:string("CallResult function was null, you must either set it in the CallResult Constructor or via Set()")))
}
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: 0x06008AAC RID: 35500 RVA: 0x001D51F4 File Offset: 0x001D33F4
[Token(Token = "0x6008AAC")]
[Address(RVA = "0x32CF1E0", Offset = "0x32CE1E0", VA = "0x1832CF1E0")]
public bool IsActive()
{
SteamAPICall_t hAPICall = this.m_hAPICall;
SteamAPICall_t invalid = SteamAPICall_t.Invalid;
return hAPICall != invalid;
}
// Token: 0x06008AAD RID: 35501 RVA: 0x001D5218 File Offset: 0x001D3418
[Token(Token = "0x6008AAD")]
[Address(RVA = "0x32CEF00", Offset = "0x32CDF00", VA = "0x1832CEF00")]
public void Cancel()
{
if (this.IsActive())
{
CallbackDispatcher.Unregister(this.m_hAPICall, this);
}
}
// Token: 0x06008AAE RID: 35502 RVA: 0x001D5240 File Offset: 0x001D3440
[Token(Token = "0x6008AAE")]
[Address(RVA = "0x32CF180", Offset = "0x32CE180", VA = "0x1832CF180", Slot = "4")]
internal override Type GetCallbackType()
{
Type type;
return type;
}
// Token: 0x06008AAF RID: 35503 RVA: 0x001D5250 File Offset: 0x001D3450
[Token(Token = "0x6008AAF")]
[Address(RVA = "0x32CF250", Offset = "0x32CE250", VA = "0x1832CF250", Slot = "5")]
internal override void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hSteamAPICall_)
{
CallResult.APIDispatchDelegate func = this.m_Func;
Type type;
object obj = Marshal.PtrToStructure(pvParam, type);
if (obj == 0)
{
}
if (obj != 0)
{
return;
}
throw new NullReferenceException();
}
// Token: 0x06008AB0 RID: 35504 RVA: 0x001D527C File Offset: 0x001D347C
[Token(Token = "0x6008AB0")]
[Address(RVA = "0x32CF410", Offset = "0x32CE410", VA = "0x1832CF410", Slot = "6")]
internal override void SetUnregistered()
{
SteamAPICall_t invalid = SteamAPICall_t.Invalid;
this.m_hAPICall = invalid;
}
// Token: 0x04005B09 RID: 23305
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4005B09")]
private SteamAPICall_t m_hAPICall;
// Token: 0x04005B0A RID: 23306
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4005B0A")]
private bool m_bDisposed;
// Token: 0x0200178E RID: 6030
[Token(Token = "0x200178E")]
public sealed class APIDispatchDelegate : MulticastDelegate
{
// Token: 0x06008AB1 RID: 35505 RVA: 0x001D5298 File Offset: 0x001D3498
[Token(Token = "0x6008AB1")]
[Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")]
public APIDispatchDelegate(object @object, IntPtr method)
{
}
// Token: 0x06008AB2 RID: 35506 RVA: 0x001D52A8 File Offset: 0x001D34A8
[Token(Token = "0x6008AB2")]
[Address(RVA = "0xF86B50", Offset = "0xF85B50", VA = "0x180F86B50", Slot = "13")]
public void Invoke(T param, bool bIOFailure)
{
uint num;
if (num != (uint)0)
{
throw new ExecutionEngineException();
}
}
// Token: 0x06008AB3 RID: 35507 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6008AB3")]
[Address(RVA = "0x32C8040", Offset = "0x32C7040", VA = "0x1832C8040", Slot = "14")]
public IAsyncResult BeginInvoke(T param, bool bIOFailure, AsyncCallback callback, object @object)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06008AB4 RID: 35508 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6008AB4")]
[Address(RVA = "0x4F56B0", Offset = "0x4F46B0", VA = "0x1804F56B0", Slot = "15")]
public void EndInvoke(IAsyncResult result)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
}
}
}