terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
ScatterGatherBuffers.cs
Go to the documentation of this file.
1using System;
2
3namespace System.Net
4{
5 // Token: 0x020001FB RID: 507
6 internal class ScatterGatherBuffers
7 {
8 // Token: 0x06000C74 RID: 3188 RVA: 0x00027BD0 File Offset: 0x00025DD0
10 {
12 base..ctor();
13 }
14
15 // Token: 0x06000C75 RID: 3189 RVA: 0x00027BF0 File Offset: 0x00025DF0
17 {
18 long num = 0L;
19 base..ctor();
22 }
23
24 // Token: 0x06000C76 RID: 3190 RVA: 0x00027C14 File Offset: 0x00025E14
26 {
27 while (this.headChunk != null)
28 {
30 if (memoryChunk == null)
31 {
32 IL_002A:
34 }
35 byte[] buffer = memoryChunk.Buffer;
36 int freeOffset = memoryChunk.FreeOffset;
37 if (memoryChunk.Next == null)
38 {
39 break;
40 }
41 }
42 goto IL_002A;
43 }
44
45 // Token: 0x1700028B RID: 651
46 // (get) Token: 0x06000C77 RID: 3191 RVA: 0x00027C50 File Offset: 0x00025E50
47 private bool Empty
48 {
49 get
50 {
51 if (this.headChunk != null)
52 {
53 int num = this.chunkCount;
54 }
55 return true;
56 }
57 }
58
59 // Token: 0x1700028C RID: 652
60 // (get) Token: 0x06000C78 RID: 3192 RVA: 0x00027C70 File Offset: 0x00025E70
61 internal int Length
62 {
63 get
64 {
65 return this.totalLength;
66 }
67 }
68
69 // Token: 0x06000C79 RID: 3193 RVA: 0x00027C84 File Offset: 0x00025E84
70 internal void Write(byte[] buffer, int offset, int count)
71 {
72 if (this.headChunk != null && this.chunkCount != 0)
73 {
75 byte[] buffer2 = memoryChunk.Buffer;
76 int freeOffset = memoryChunk.FreeOffset;
77 }
80 if (memoryChunk3 != null)
81 {
83 }
85 int freeOffset2 = memoryChunk2.FreeOffset;
86 byte[] buffer3 = memoryChunk2.Buffer;
87 int num = this.totalLength;
89 this.totalLength = num;
90 int freeOffset3 = memoryChunk4.FreeOffset;
92 }
93
94 // Token: 0x06000C7A RID: 3194 RVA: 0x00027D18 File Offset: 0x00025F18
96 {
97 /*
98An exception occurred when decompiling this method (06000C7A)
99
100ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.ScatterGatherBuffers/MemoryChunk System.Net.ScatterGatherBuffers::AllocateMemoryChunk(System.Int32)
101
102 ---> System.Exception: Basic block has to end with unconditional control flow.
103{
104 IL_0022:
105 stloc:int32(var_3_28, ldfld:int32(ScatterGatherBuffers::nextChunkLength, ldloc:ScatterGatherBuffers(this)))
106 stfld:int32(ScatterGatherBuffers::chunkCount, ldloc:ScatterGatherBuffers(this), ldloc:int32(var_2_1B))
107 stfld:int32(ScatterGatherBuffers::nextChunkLength, ldloc:ScatterGatherBuffers(this), ldloc:int32(var_3_28))
108}
109
110 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
111 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
112 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
113 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
114 --- End of inner exception stack trace ---
115 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
116 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 1683
117*/;
118 }
119
120 // Token: 0x04000AB0 RID: 2736
122
123 // Token: 0x04000AB1 RID: 2737
125
126 // Token: 0x04000AB2 RID: 2738
127 private int nextChunkLength;
128
129 // Token: 0x04000AB3 RID: 2739
130 private int totalLength;
131
132 // Token: 0x04000AB4 RID: 2740
133 private int chunkCount;
134
135 // Token: 0x020001FC RID: 508
136 private class MemoryChunk
137 {
138 // Token: 0x06000C7B RID: 3195 RVA: 0x00027D5C File Offset: 0x00025F5C
139 internal MemoryChunk(int bufferSize)
140 {
141 }
142
143 // Token: 0x04000AB5 RID: 2741
144 internal byte[] Buffer;
145
146 // Token: 0x04000AB6 RID: 2742
147 internal int FreeOffset;
148
149 // Token: 0x04000AB7 RID: 2743
151 }
152 }
153}
class f__AnonymousType0<< Count > j__TPar
ScatterGatherBuffers.MemoryChunk currentChunk
void Write(byte[] buffer, int offset, int count)
ScatterGatherBuffers.MemoryChunk AllocateMemoryChunk(int newSize)
ScatterGatherBuffers.MemoryChunk headChunk