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
EndpointPermission.cs
Go to the documentation of this file.
1using System;
3
4namespace System.Net
5{
6 // Token: 0x02000243 RID: 579
8 public class EndpointPermission
9 {
10 // Token: 0x06000E95 RID: 3733 RVA: 0x0002E570 File Offset: 0x0002C770
12 {
13 do
14 {
15 base..ctor();
16 }
17 while (hostname == null);
21 }
22
23 // Token: 0x17000303 RID: 771
24 // (get) Token: 0x06000E96 RID: 3734 RVA: 0x0002E59C File Offset: 0x0002C79C
25 public string Hostname
26 {
27 get
28 {
29 return this.hostname;
30 }
31 }
32
33 // Token: 0x17000304 RID: 772
34 // (get) Token: 0x06000E97 RID: 3735 RVA: 0x0002E5B0 File Offset: 0x0002C7B0
35 public int Port
36 {
37 get
38 {
39 return this.port;
40 }
41 }
42
43 // Token: 0x17000305 RID: 773
44 // (get) Token: 0x06000E98 RID: 3736 RVA: 0x0002E5C4 File Offset: 0x0002C7C4
46 {
47 get
48 {
49 return this.transport;
50 }
51 }
52
53 // Token: 0x06000E99 RID: 3737 RVA: 0x0002E5D8 File Offset: 0x0002C7D8
54 public override bool Equals(object obj)
55 {
56 if (obj != null)
57 {
58 int num = this.port;
59 TransportType transportType = this.transport;
60 string text = this.hostname;
61 return;
62 }
63 }
64
65 // Token: 0x06000E9A RID: 3738 RVA: 0x00002050 File Offset: 0x00000250
66 public override int GetHashCode()
67 {
68 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
69 }
70
71 // Token: 0x06000E9B RID: 3739 RVA: 0x0002E600 File Offset: 0x0002C800
72 public override string ToString()
73 {
74 string text = this.hostname;
75 string text2;
76 if ((text == null || text != null) && ("#" == null || "#" != null) && (text2 == null || text2 != null) && ("#" == null || "#" != null))
77 {
78 TransportType transportType = this.transport;
79 string text3;
80 if (text3 == null || text3 != null)
81 {
82 string text4;
83 return text4;
84 }
85 }
87 }
88
89 // Token: 0x06000E9C RID: 3740 RVA: 0x0002E658 File Offset: 0x0002C858
91 {
92 if (perm == null)
93 {
94 return;
95 }
96 int num = perm.port;
97 int num2 = this.port;
98 TransportType transportType = perm.transport;
100 this.Resolve();
101 perm.Resolve();
102 if (this.hasWildcard)
103 {
104 if (perm.hasWildcard)
105 {
106 string text = this.hostname;
107 string text2 = perm.hostname;
108 return this.IsSubsetOf(text, text2);
109 }
110 return;
111 }
112 else
113 {
114 IPAddress[] array = this.addresses;
115 if (array == null)
116 {
117 return;
118 }
119 if (perm.hasWildcard)
120 {
121 ushort[] numbers = array._numbers;
122 string text3 = perm.hostname;
123 }
124 IPAddress[] array2 = perm.addresses;
125 if (array2 != null)
126 {
127 ushort[] numbers2 = array2._numbers;
128 string text4 = this.hostname;
129 return;
130 }
131 return;
132 }
133 }
134
135 // Token: 0x06000E9D RID: 3741 RVA: 0x0002E710 File Offset: 0x0002C910
136 private bool IsSubsetOf(string addr1, string addr2)
137 {
138 if (!true)
139 {
140 return;
141 }
142 }
143
144 // Token: 0x06000E9E RID: 3742 RVA: 0x0002E728 File Offset: 0x0002C928
146 {
147 while (perm != null)
148 {
149 int num = this.port;
150 int num2 = perm.port;
151 TransportType transportType = this.transport;
153 if (this.IntersectHostname(perm) == null || (this.hasWildcard && perm.hasWildcard))
154 {
155 return;
156 }
157 }
158 }
159
160 // Token: 0x06000E9F RID: 3743 RVA: 0x0002E770 File Offset: 0x0002C970
162 {
163 string text5;
164 for (;;)
165 {
166 string text = this.hostname;
167 string text2 = perm.hostname;
168 bool flag = text == text2;
169 string text3 = this.hostname;
170 this.Resolve();
171 perm.Resolve();
172 bool flag2 = this.hasWildcard;
173 if (perm.hasWildcard)
174 {
175 break;
176 }
177 IPAddress[] array = perm.addresses;
178 if (array == null)
179 {
180 return;
181 }
182 ushort[] numbers = array._numbers;
183 string toString = array._toString;
184 string text4 = this.hostname;
185 if (text5 == null)
186 {
187 goto Block_2;
188 }
189 }
190 string text6 = this.hostname;
191 string text7 = perm.hostname;
192 return perm.Intersect(text6, text7);
193 Block_2:
194 IPAddress[] array2 = perm.addresses;
195 return text5;
196 }
197
198 // Token: 0x06000EA0 RID: 3744 RVA: 0x0002E880 File Offset: 0x0002CA80
199 private string Intersect(string addr1, string addr2)
200 {
201 if (!true)
202 {
203 }
204 if ("*" == null)
205 {
206 int num;
207 string text = num.ToString();
208 string text2;
209 if (text2 == null)
210 {
211 return text2;
212 }
213 }
214 string text3;
215 if (text3 == null)
216 {
217 return text3;
218 }
219 if ("." != null && ("." == null || "." == null || "." == null))
220 {
221 throw new ArrayTypeMismatchException();
222 }
223 string text4;
224 return text4;
225 }
226
227 // Token: 0x06000EA1 RID: 3745 RVA: 0x0002E8E8 File Offset: 0x0002CAE8
228 private int ToNumber(string value)
229 {
230 bool flag = value == "*";
231 return 256;
232 }
233
234 // Token: 0x06000EA2 RID: 3746 RVA: 0x0002E924 File Offset: 0x0002CB24
235 internal void Resolve()
236 {
237 bool flag = this.resolved;
238 if (!flag)
239 {
240 string text = this.hostname;
241 if (!flag)
242 {
243 }
244 return;
245 }
246 }
247
248 // Token: 0x06000EA3 RID: 3747 RVA: 0x0002E99C File Offset: 0x0002CB9C
249 internal void UndoResolve()
250 {
251 }
252
253 // Token: 0x06000EA4 RID: 3748 RVA: 0x0002E9AC File Offset: 0x0002CBAC
254 // Note: this type is marked as 'beforefieldinit'.
256 {
257 }
258
259 // Token: 0x06000EA5 RID: 3749 RVA: 0x0002E9BC File Offset: 0x0002CBBC
261 {
262 throw new NotSupportedException();
263 }
264
265 // Token: 0x04000BE2 RID: 3042
266 private static char[] dot_char;
267
268 // Token: 0x04000BE3 RID: 3043
269 private string hostname;
270
271 // Token: 0x04000BE4 RID: 3044
272 private int port;
273
274 // Token: 0x04000BE5 RID: 3045
276
277 // Token: 0x04000BE6 RID: 3046
278 private bool resolved;
279
280 // Token: 0x04000BE7 RID: 3047
281 private bool hasWildcard;
282
283 // Token: 0x04000BE8 RID: 3048
285 }
286}
class f__AnonymousType0<< Count > j__TPar
override bool Equals(object obj)
string Intersect(string addr1, string addr2)
bool IsSubsetOf(EndpointPermission perm)
EndpointPermission(string hostname, int port, TransportType transport)
EndpointPermission Intersect(EndpointPermission perm)
bool IsSubsetOf(string addr1, string addr2)
string IntersectHostname(EndpointPermission perm)
readonly ushort[] _numbers
Definition IPAddress.cs:749