-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathGuessAccessors.cs
More file actions
129 lines (118 loc) · 4.42 KB
/
GuessAccessors.cs
File metadata and controls
129 lines (118 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// ClassLibrary1.UnknownClassTest
using System;
using System.Collections.Generic;
using UnknownNamespace;
namespace ClassLibrary1
{
public class UnknownClassTest : EventArgs
{
public void MethodUnknownClass()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
UnknownClass val = new UnknownClass();
int? unknownProperty = val.UnknownProperty;
int? num = (val.UnknownProperty = unknownProperty.GetValueOrDefault());
int? num3 = num;
List<object> list = new List<object> {
val[unknownProperty.Value] ?? "",
val.NotProperty,
val.get_NotPropertyWithGeneric<string>(42),
val[42],
val.get_NotPropertyWithParameterAndGeneric<object>(int.MinValue),
val.get_PropertyCalledGet,
val.set_HasReturnType(),
val.set_HasReturnType("")
};
val.get_NoReturnType();
val.set_NoValue();
val.OnEvent += Instance_OnEvent;
val.OnEvent -= Instance_OnEvent;
string text = val[(long?)null];
val[(long?)long.MaxValue] = text;
IntPtr intPtr = val[UIntPtr.Zero, "Hello"];
val[(UIntPtr)32uL, "World"] = intPtr;
}
public void MethodUnknownGenericClass()
{
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Expected O, but got Unknown
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Expected O, but got Unknown
//IL_00cd: Expected O, but got Unknown
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Expected O, but got Unknown
//IL_00e1: Expected O, but got Unknown
UnknownGenericClass<UnknownEventArgs> val = new UnknownGenericClass<UnknownEventArgs>();
UnknownEventArgs e = (val.UnknownProperty = val.UnknownProperty);
List<object> list = new List<object> {
val[((object)e).GetHashCode()] ?? "",
val.NotProperty,
val.get_NotPropertyWithGeneric<string>(42),
val[42],
val.get_NotPropertyWithParameterAndGeneric<object>(int.MinValue),
val.get_PropertyCalledGet
};
val.OnEvent += Instance_OnEvent;
val.OnEvent -= Instance_OnEvent;
UnknownEventArgs e2 = val[(UnknownEventArgs)null];
val[new UnknownEventArgs()] = e2;
UnknownEventArgs e3 = val[new UnknownEventArgs(), new UnknownEventArgs()];
val[new UnknownEventArgs(), new UnknownEventArgs()] = e3;
}
public void MethodUnknownStatic()
{
int? num = (UnknownStaticClass.UnknownProperty = UnknownStaticClass.UnknownProperty);
List<object> list = new List<object> {
UnknownStaticClass[num.Value] ?? "",
UnknownStaticClass.NotProperty,
UnknownStaticClass.get_NotPropertyWithGeneric<string>(42),
UnknownStaticClass[42],
UnknownStaticClass.get_NotPropertyWithParameterAndGeneric<object>(int.MinValue),
UnknownStaticClass.get_PropertyCalledGet
};
UnknownStaticClass.OnEvent += Instance_OnEvent;
UnknownStaticClass.OnEvent -= Instance_OnEvent;
}
public void MethodUnknownStaticGeneric()
{
string text = (UnknownStaticGenericClass<string>.UnknownProperty = UnknownStaticGenericClass<string>.UnknownProperty);
List<object> list = new List<object> {
UnknownStaticGenericClass<string>[text.Length] ?? "",
UnknownStaticGenericClass<string>.NotProperty,
UnknownStaticGenericClass<string>.get_NotPropertyWithGeneric<string>(42),
UnknownStaticGenericClass<string>[42],
UnknownStaticGenericClass<string>.get_NotPropertyWithParameterAndGeneric<object>(int.MinValue),
UnknownStaticGenericClass<string>.get_PropertyCalledGet
};
UnknownStaticGenericClass<string>.OnEvent += Instance_OnEvent;
UnknownStaticGenericClass<string>.OnEvent -= Instance_OnEvent;
}
public void MethodUnknownIndexerInitializer()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new UnknownClass {
["a"] = 1,
["b"] = 2
};
}
private void Instance_OnEvent(object sender, EventArgs e)
{
throw new NotImplementedException();
}
private void Instance_OnEvent(object sender, UnknownEventArgs e)
{
throw new NotImplementedException();
}
private void Instance_OnEvent(object sender, string e)
{
throw new NotImplementedException();
}
private static void Instance_OnEvent(object sender, object e)
{
throw new NotImplementedException();
}
}
}