Merge pull request #820 from brendanzagaeski/master
[mono.git] / mcs / class / dlr / Runtime / Microsoft.Dynamic / Interpreter / Instructions / CallInstruction.Generated.cs
1 /* ****************************************************************************
2  *
3  * Copyright (c) Microsoft Corporation. 
4  *
5  * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
6  * copy of the license can be found in the License.html file at the root of this distribution. If 
7  * you cannot locate the  Apache License, Version 2.0, please send an email to 
8  * ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
9  * by the terms of the Apache License, Version 2.0.
10  *
11  * You must not remove this notice, or any other, from this software.
12  *
13  *
14  * ***************************************************************************/
15 #if FEATURE_CORE_DLR
16 using System.Linq.Expressions;
17 #else
18 using Microsoft.Scripting.Ast;
19 #endif
20
21 using System;
22 using System.Collections.Generic;
23 using System.Diagnostics;
24 using System.Reflection;
25 using System.Threading;
26 using Microsoft.Scripting.Utils;
27 using Microsoft.Scripting.Generation;
28 using Microsoft.Scripting.Runtime;
29
30 using System.Dynamic;
31
32 namespace Microsoft.Scripting.Interpreter {
33     #region Generated Reflected Caller
34
35     // *** BEGIN GENERATED CODE ***
36     // generated by function: gen_all from: generate_reflected_calls.py
37
38     public partial class CallInstruction {
39         private const int MaxHelpers = 10;
40         private const int MaxArgs = 3;
41
42         public virtual object InvokeInstance(object instance, params object[] args) {
43             switch(args.Length) {
44                 case 0: return Invoke(instance);
45                 case 1: return Invoke(instance, args[0]);
46                 case 2: return Invoke(instance, args[0], args[1]);
47                 case 3: return Invoke(instance, args[0], args[1], args[2]);
48                 case 4: return Invoke(instance, args[0], args[1], args[2], args[3]);
49                 case 5: return Invoke(instance, args[0], args[1], args[2], args[3], args[4]);
50                 case 6: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5]);
51                 case 7: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
52                 case 8: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
53                 default: throw new InvalidOperationException();
54             }
55         }
56
57         public virtual object Invoke(params object[] args) {
58             switch(args.Length) {
59                 case 0: return Invoke();
60                 case 1: return Invoke(args[0]);
61                 case 2: return Invoke(args[0], args[1]);
62                 case 3: return Invoke(args[0], args[1], args[2]);
63                 case 4: return Invoke(args[0], args[1], args[2], args[3]);
64                 case 5: return Invoke(args[0], args[1], args[2], args[3], args[4]);
65                 case 6: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5]);
66                 case 7: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
67                 case 8: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
68                 case 9: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]);
69                 default: throw new InvalidOperationException();
70             }
71         }
72
73         public virtual object Invoke() { throw new InvalidOperationException(); }
74         public virtual object Invoke(object arg0) { throw new InvalidOperationException(); }
75         public virtual object Invoke(object arg0, object arg1) { throw new InvalidOperationException(); }
76         public virtual object Invoke(object arg0, object arg1, object arg2) { throw new InvalidOperationException(); }
77         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3) { throw new InvalidOperationException(); }
78         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) { throw new InvalidOperationException(); }
79         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) { throw new InvalidOperationException(); }
80         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) { throw new InvalidOperationException(); }
81         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) { throw new InvalidOperationException(); }
82         public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) { throw new InvalidOperationException(); }
83
84         /// <summary>
85         /// Fast creation works if we have a known primitive types for the entire
86         /// method siganture.  If we have any non-primitive types then FastCreate
87         /// falls back to SlowCreate which works for all types.
88         /// 
89         /// Fast creation is fast because it avoids using reflection (MakeGenericType
90         /// and Activator.CreateInstance) to create the types.  It does this through
91         /// calling a series of generic methods picking up each strong type of the
92         /// signature along the way.  When it runs out of types it news up the 
93         /// appropriate CallInstruction with the strong-types that have been built up.
94         /// 
95         /// One relaxation is that for return types which are non-primitive types
96         /// we can fallback to object due to relaxed delegates.
97         /// </summary>
98         private static CallInstruction FastCreate(MethodInfo target, ParameterInfo[] pi) {
99             Type t = TryGetParameterOrReturnType(target, pi, 0);
100             if (t == null) {
101                 return new ActionCallInstruction(target);
102             }
103
104             if (t.IsEnum()) return SlowCreate(target, pi);
105             switch (t.GetTypeCode()) {
106                 case TypeCode.Object: {
107                     if (t != typeof(object) && (IndexIsNotReturnType(0, target, pi) || t.IsValueType())) {
108                         // if we're on the return type relaxed delegates makes it ok to use object
109                         goto default;
110                     }
111                     return FastCreate<Object>(target, pi);
112                 }
113                 case TypeCode.Int16: return FastCreate<Int16>(target, pi);
114                 case TypeCode.Int32: return FastCreate<Int32>(target, pi);
115                 case TypeCode.Int64: return FastCreate<Int64>(target, pi);
116                 case TypeCode.Boolean: return FastCreate<Boolean>(target, pi);
117                 case TypeCode.Char: return FastCreate<Char>(target, pi);
118                 case TypeCode.Byte: return FastCreate<Byte>(target, pi);
119                 case TypeCode.Decimal: return FastCreate<Decimal>(target, pi);
120                 case TypeCode.DateTime: return FastCreate<DateTime>(target, pi);
121                 case TypeCode.Double: return FastCreate<Double>(target, pi);
122                 case TypeCode.Single: return FastCreate<Single>(target, pi);
123                 case TypeCode.UInt16: return FastCreate<UInt16>(target, pi);
124                 case TypeCode.UInt32: return FastCreate<UInt32>(target, pi);
125                 case TypeCode.UInt64: return FastCreate<UInt64>(target, pi);
126                 case TypeCode.String: return FastCreate<String>(target, pi);
127                 case TypeCode.SByte: return FastCreate<SByte>(target, pi);
128                 default: return SlowCreate(target, pi);
129             }
130         }
131
132         private static CallInstruction FastCreate<T0>(MethodInfo target, ParameterInfo[] pi) {
133             Type t = TryGetParameterOrReturnType(target, pi, 1);
134             if (t == null) {
135                 if (target.ReturnType == typeof(void)) {
136                     return new ActionCallInstruction<T0>(target);
137                 }
138                 return new FuncCallInstruction<T0>(target);
139             }
140
141             if (t.IsEnum()) return SlowCreate(target, pi);
142             switch (t.GetTypeCode()) {
143                 case TypeCode.Object: {
144                     if (t != typeof(object) && (IndexIsNotReturnType(1, target, pi) || t.IsValueType())) {
145                         // if we're on the return type relaxed delegates makes it ok to use object
146                         goto default;
147                     }
148                     return FastCreate<T0, Object>(target, pi);
149                 }
150                 case TypeCode.Int16: return FastCreate<T0, Int16>(target, pi);
151                 case TypeCode.Int32: return FastCreate<T0, Int32>(target, pi);
152                 case TypeCode.Int64: return FastCreate<T0, Int64>(target, pi);
153                 case TypeCode.Boolean: return FastCreate<T0, Boolean>(target, pi);
154                 case TypeCode.Char: return FastCreate<T0, Char>(target, pi);
155                 case TypeCode.Byte: return FastCreate<T0, Byte>(target, pi);
156                 case TypeCode.Decimal: return FastCreate<T0, Decimal>(target, pi);
157                 case TypeCode.DateTime: return FastCreate<T0, DateTime>(target, pi);
158                 case TypeCode.Double: return FastCreate<T0, Double>(target, pi);
159                 case TypeCode.Single: return FastCreate<T0, Single>(target, pi);
160                 case TypeCode.UInt16: return FastCreate<T0, UInt16>(target, pi);
161                 case TypeCode.UInt32: return FastCreate<T0, UInt32>(target, pi);
162                 case TypeCode.UInt64: return FastCreate<T0, UInt64>(target, pi);
163                 case TypeCode.String: return FastCreate<T0, String>(target, pi);
164                 case TypeCode.SByte: return FastCreate<T0, SByte>(target, pi);
165                 default: return SlowCreate(target, pi);
166             }
167         }
168
169         private static CallInstruction FastCreate<T0, T1>(MethodInfo target, ParameterInfo[] pi) {
170             Type t = TryGetParameterOrReturnType(target, pi, 2);
171             if (t == null) {
172                 if (target.ReturnType == typeof(void)) {
173                     return new ActionCallInstruction<T0, T1>(target);
174                 }
175                 return new FuncCallInstruction<T0, T1>(target);
176             }
177
178             if (t.IsEnum()) return SlowCreate(target, pi);
179             switch (t.GetTypeCode()) {
180                 case TypeCode.Object: {
181                     Debug.Assert(pi.Length == 2);
182                     if (t.IsValueType()) goto default;
183
184                     return new FuncCallInstruction<T0, T1, Object>(target);
185                 }
186                 case TypeCode.Int16: return new FuncCallInstruction<T0, T1, Int16>(target);
187                 case TypeCode.Int32: return new FuncCallInstruction<T0, T1, Int32>(target);
188                 case TypeCode.Int64: return new FuncCallInstruction<T0, T1, Int64>(target);
189                 case TypeCode.Boolean: return new FuncCallInstruction<T0, T1, Boolean>(target);
190                 case TypeCode.Char: return new FuncCallInstruction<T0, T1, Char>(target);
191                 case TypeCode.Byte: return new FuncCallInstruction<T0, T1, Byte>(target);
192                 case TypeCode.Decimal: return new FuncCallInstruction<T0, T1, Decimal>(target);
193                 case TypeCode.DateTime: return new FuncCallInstruction<T0, T1, DateTime>(target);
194                 case TypeCode.Double: return new FuncCallInstruction<T0, T1, Double>(target);
195                 case TypeCode.Single: return new FuncCallInstruction<T0, T1, Single>(target);
196                 case TypeCode.UInt16: return new FuncCallInstruction<T0, T1, UInt16>(target);
197                 case TypeCode.UInt32: return new FuncCallInstruction<T0, T1, UInt32>(target);
198                 case TypeCode.UInt64: return new FuncCallInstruction<T0, T1, UInt64>(target);
199                 case TypeCode.String: return new FuncCallInstruction<T0, T1, String>(target);
200                 case TypeCode.SByte: return new FuncCallInstruction<T0, T1, SByte>(target);
201                 default: return SlowCreate(target, pi);
202             }
203         }
204
205         private static Type GetHelperType(MethodInfo info, Type[] arrTypes) {
206             Type t;
207             if (info.ReturnType == typeof(void)) {
208                 switch (arrTypes.Length) {
209                     case 0: t = typeof(ActionCallInstruction); break;
210                     case 1: t = typeof(ActionCallInstruction<>).MakeGenericType(arrTypes); break;
211                     case 2: t = typeof(ActionCallInstruction<,>).MakeGenericType(arrTypes); break;
212                     case 3: t = typeof(ActionCallInstruction<,,>).MakeGenericType(arrTypes); break;
213                     case 4: t = typeof(ActionCallInstruction<,,,>).MakeGenericType(arrTypes); break;
214                     case 5: t = typeof(ActionCallInstruction<,,,,>).MakeGenericType(arrTypes); break;
215                     case 6: t = typeof(ActionCallInstruction<,,,,,>).MakeGenericType(arrTypes); break;
216                     case 7: t = typeof(ActionCallInstruction<,,,,,,>).MakeGenericType(arrTypes); break;
217                     case 8: t = typeof(ActionCallInstruction<,,,,,,,>).MakeGenericType(arrTypes); break;
218                     case 9: t = typeof(ActionCallInstruction<,,,,,,,,>).MakeGenericType(arrTypes); break;
219                     default: throw new InvalidOperationException();
220                 }
221             } else {
222                 switch (arrTypes.Length) {
223                     case 1: t = typeof(FuncCallInstruction<>).MakeGenericType(arrTypes); break;
224                     case 2: t = typeof(FuncCallInstruction<,>).MakeGenericType(arrTypes); break;
225                     case 3: t = typeof(FuncCallInstruction<,,>).MakeGenericType(arrTypes); break;
226                     case 4: t = typeof(FuncCallInstruction<,,,>).MakeGenericType(arrTypes); break;
227                     case 5: t = typeof(FuncCallInstruction<,,,,>).MakeGenericType(arrTypes); break;
228                     case 6: t = typeof(FuncCallInstruction<,,,,,>).MakeGenericType(arrTypes); break;
229                     case 7: t = typeof(FuncCallInstruction<,,,,,,>).MakeGenericType(arrTypes); break;
230                     case 8: t = typeof(FuncCallInstruction<,,,,,,,>).MakeGenericType(arrTypes); break;
231                     case 9: t = typeof(FuncCallInstruction<,,,,,,,,>).MakeGenericType(arrTypes); break;
232                     case 10: t = typeof(FuncCallInstruction<,,,,,,,,,>).MakeGenericType(arrTypes); break;
233                     default: throw new InvalidOperationException();
234                 }
235             }
236             return t;
237         }
238         public static MethodInfo CacheFunc<TRet>(Func<TRet> method) {
239             var info = method.GetMethodInfo();
240             lock (_cache) {
241                 _cache[info] = new FuncCallInstruction<TRet>(method);
242             }
243             return info;
244         }
245
246         public static MethodInfo CacheFunc<T0, TRet>(Func<T0, TRet> method) {
247             var info = method.GetMethodInfo();
248             lock (_cache) {
249                 _cache[info] = new FuncCallInstruction<T0, TRet>(method);
250             }
251             return info;
252         }
253
254         public static MethodInfo CacheFunc<T0, T1, TRet>(Func<T0, T1, TRet> method) {
255             var info = method.GetMethodInfo();
256             lock (_cache) {
257                 _cache[info] = new FuncCallInstruction<T0, T1, TRet>(method);
258             }
259             return info;
260         }
261
262         public static MethodInfo CacheFunc<T0, T1, T2, TRet>(Func<T0, T1, T2, TRet> method) {
263             var info = method.GetMethodInfo();
264             lock (_cache) {
265                 _cache[info] = new FuncCallInstruction<T0, T1, T2, TRet>(method);
266             }
267             return info;
268         }
269
270         public static MethodInfo CacheFunc<T0, T1, T2, T3, TRet>(Func<T0, T1, T2, T3, TRet> method) {
271             var info = method.GetMethodInfo();
272             lock (_cache) {
273                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, TRet>(method);
274             }
275             return info;
276         }
277
278         public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, TRet>(Func<T0, T1, T2, T3, T4, TRet> method) {
279             var info = method.GetMethodInfo();
280             lock (_cache) {
281                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, TRet>(method);
282             }
283             return info;
284         }
285
286         public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, TRet>(Func<T0, T1, T2, T3, T4, T5, TRet> method) {
287             var info = method.GetMethodInfo();
288             lock (_cache) {
289                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, TRet>(method);
290             }
291             return info;
292         }
293
294         public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, TRet> method) {
295             var info = method.GetMethodInfo();
296             lock (_cache) {
297                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, TRet>(method);
298             }
299             return info;
300         }
301
302         public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> method) {
303             var info = method.GetMethodInfo();
304             lock (_cache) {
305                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(method);
306             }
307             return info;
308         }
309
310         public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> method) {
311             var info = method.GetMethodInfo();
312             lock (_cache) {
313                 _cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(method);
314             }
315             return info;
316         }
317
318         public static MethodInfo CacheAction(Action method) {
319             var info = method.GetMethodInfo();
320             lock (_cache) {
321                 _cache[info] = new ActionCallInstruction(method);
322             }
323             return info;
324         }
325
326         public static MethodInfo CacheAction<T0>(Action<T0> method) {
327             var info = method.GetMethodInfo();
328             lock (_cache) {
329                 _cache[info] = new ActionCallInstruction<T0>(method);
330             }
331             return info;
332         }
333
334         public static MethodInfo CacheAction<T0, T1>(Action<T0, T1> method) {
335             var info = method.GetMethodInfo();
336             lock (_cache) {
337                 _cache[info] = new ActionCallInstruction<T0, T1>(method);
338             }
339             return info;
340         }
341
342         public static MethodInfo CacheAction<T0, T1, T2>(Action<T0, T1, T2> method) {
343             var info = method.GetMethodInfo();
344             lock (_cache) {
345                 _cache[info] = new ActionCallInstruction<T0, T1, T2>(method);
346             }
347             return info;
348         }
349
350         public static MethodInfo CacheAction<T0, T1, T2, T3>(Action<T0, T1, T2, T3> method) {
351             var info = method.GetMethodInfo();
352             lock (_cache) {
353                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3>(method);
354             }
355             return info;
356         }
357
358         public static MethodInfo CacheAction<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4> method) {
359             var info = method.GetMethodInfo();
360             lock (_cache) {
361                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4>(method);
362             }
363             return info;
364         }
365
366         public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5> method) {
367             var info = method.GetMethodInfo();
368             lock (_cache) {
369                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5>(method);
370             }
371             return info;
372         }
373
374         public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6> method) {
375             var info = method.GetMethodInfo();
376             lock (_cache) {
377                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6>(method);
378             }
379             return info;
380         }
381
382         public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7> method) {
383             var info = method.GetMethodInfo();
384             lock (_cache) {
385                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7>(method);
386             }
387             return info;
388         }
389
390         public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> method) {
391             var info = method.GetMethodInfo();
392             lock (_cache) {
393                 _cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8>(method);
394             }
395             return info;
396         }
397
398     }
399
400     internal sealed class ActionCallInstruction : CallInstruction {
401         private readonly Action _target;
402         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
403         public override int ArgumentCount { get { return 0; } }
404
405         public ActionCallInstruction(Action target) {
406             _target = target;
407         }
408
409         public ActionCallInstruction(MethodInfo target) {
410             _target = (Action)target.CreateDelegate(typeof(Action));
411         }
412
413         public override object Invoke() {
414             _target();
415             return null;
416         }
417
418         public override int Run(InterpretedFrame frame) {
419             _target();
420             frame.StackIndex -= 0;
421             return 1;
422         }
423     }
424
425     internal sealed class ActionCallInstruction<T0> : CallInstruction {
426         private readonly Action<T0> _target;
427         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
428         public override int ArgumentCount { get { return 1; } }
429
430         public ActionCallInstruction(Action<T0> target) {
431             _target = target;
432         }
433
434         public ActionCallInstruction(MethodInfo target) {
435             _target = (Action<T0>)target.CreateDelegate(typeof(Action<T0>));
436         }
437
438         public override object Invoke(object arg0) {
439             _target(arg0 != null ? (T0)arg0 : default(T0));
440             return null;
441         }
442
443         public override int Run(InterpretedFrame frame) {
444             _target((T0)frame.Data[frame.StackIndex - 1]);
445             frame.StackIndex -= 1;
446             return 1;
447         }
448     }
449
450     internal sealed class ActionCallInstruction<T0, T1> : CallInstruction {
451         private readonly Action<T0, T1> _target;
452         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
453         public override int ArgumentCount { get { return 2; } }
454
455         public ActionCallInstruction(Action<T0, T1> target) {
456             _target = target;
457         }
458
459         public ActionCallInstruction(MethodInfo target) {
460             _target = (Action<T0, T1>)target.CreateDelegate(typeof(Action<T0, T1>));
461         }
462
463         public override object Invoke(object arg0, object arg1) {
464             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1));
465             return null;
466         }
467
468         public override int Run(InterpretedFrame frame) {
469             _target((T0)frame.Data[frame.StackIndex - 2], (T1)frame.Data[frame.StackIndex - 1]);
470             frame.StackIndex -= 2;
471             return 1;
472         }
473     }
474
475     internal sealed class ActionCallInstruction<T0, T1, T2> : CallInstruction {
476         private readonly Action<T0, T1, T2> _target;
477         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
478         public override int ArgumentCount { get { return 3; } }
479
480         public ActionCallInstruction(Action<T0, T1, T2> target) {
481             _target = target;
482         }
483
484         public ActionCallInstruction(MethodInfo target) {
485             _target = (Action<T0, T1, T2>)target.CreateDelegate(typeof(Action<T0, T1, T2>));
486         }
487
488         public override object Invoke(object arg0, object arg1, object arg2) {
489             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2));
490             return null;
491         }
492
493         public override int Run(InterpretedFrame frame) {
494             _target((T0)frame.Data[frame.StackIndex - 3], (T1)frame.Data[frame.StackIndex - 2], (T2)frame.Data[frame.StackIndex - 1]);
495             frame.StackIndex -= 3;
496             return 1;
497         }
498     }
499
500     internal sealed class ActionCallInstruction<T0, T1, T2, T3> : CallInstruction {
501         private readonly Action<T0, T1, T2, T3> _target;
502         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
503         public override int ArgumentCount { get { return 4; } }
504
505         public ActionCallInstruction(Action<T0, T1, T2, T3> target) {
506             _target = target;
507         }
508
509         public ActionCallInstruction(MethodInfo target) {
510             _target = (Action<T0, T1, T2, T3>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3>));
511         }
512
513         public override object Invoke(object arg0, object arg1, object arg2, object arg3) {
514             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3));
515             return null;
516         }
517
518         public override int Run(InterpretedFrame frame) {
519             _target((T0)frame.Data[frame.StackIndex - 4], (T1)frame.Data[frame.StackIndex - 3], (T2)frame.Data[frame.StackIndex - 2], (T3)frame.Data[frame.StackIndex - 1]);
520             frame.StackIndex -= 4;
521             return 1;
522         }
523     }
524
525     internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4> : CallInstruction {
526         private readonly Action<T0, T1, T2, T3, T4> _target;
527         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
528         public override int ArgumentCount { get { return 5; } }
529
530         public ActionCallInstruction(Action<T0, T1, T2, T3, T4> target) {
531             _target = target;
532         }
533
534         public ActionCallInstruction(MethodInfo target) {
535             _target = (Action<T0, T1, T2, T3, T4>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4>));
536         }
537
538         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) {
539             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4));
540             return null;
541         }
542
543         public override int Run(InterpretedFrame frame) {
544             _target((T0)frame.Data[frame.StackIndex - 5], (T1)frame.Data[frame.StackIndex - 4], (T2)frame.Data[frame.StackIndex - 3], (T3)frame.Data[frame.StackIndex - 2], (T4)frame.Data[frame.StackIndex - 1]);
545             frame.StackIndex -= 5;
546             return 1;
547         }
548     }
549
550     internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5> : CallInstruction {
551         private readonly Action<T0, T1, T2, T3, T4, T5> _target;
552         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
553         public override int ArgumentCount { get { return 6; } }
554
555         public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5> target) {
556             _target = target;
557         }
558
559         public ActionCallInstruction(MethodInfo target) {
560             _target = (Action<T0, T1, T2, T3, T4, T5>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5>));
561         }
562
563         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) {
564             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5));
565             return null;
566         }
567
568         public override int Run(InterpretedFrame frame) {
569             _target((T0)frame.Data[frame.StackIndex - 6], (T1)frame.Data[frame.StackIndex - 5], (T2)frame.Data[frame.StackIndex - 4], (T3)frame.Data[frame.StackIndex - 3], (T4)frame.Data[frame.StackIndex - 2], (T5)frame.Data[frame.StackIndex - 1]);
570             frame.StackIndex -= 6;
571             return 1;
572         }
573     }
574
575     internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6> : CallInstruction {
576         private readonly Action<T0, T1, T2, T3, T4, T5, T6> _target;
577         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
578         public override int ArgumentCount { get { return 7; } }
579
580         public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6> target) {
581             _target = target;
582         }
583
584         public ActionCallInstruction(MethodInfo target) {
585             _target = (Action<T0, T1, T2, T3, T4, T5, T6>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6>));
586         }
587
588         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) {
589             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6));
590             return null;
591         }
592
593         public override int Run(InterpretedFrame frame) {
594             _target((T0)frame.Data[frame.StackIndex - 7], (T1)frame.Data[frame.StackIndex - 6], (T2)frame.Data[frame.StackIndex - 5], (T3)frame.Data[frame.StackIndex - 4], (T4)frame.Data[frame.StackIndex - 3], (T5)frame.Data[frame.StackIndex - 2], (T6)frame.Data[frame.StackIndex - 1]);
595             frame.StackIndex -= 7;
596             return 1;
597         }
598     }
599
600     internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7> : CallInstruction {
601         private readonly Action<T0, T1, T2, T3, T4, T5, T6, T7> _target;
602         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
603         public override int ArgumentCount { get { return 8; } }
604
605         public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6, T7> target) {
606             _target = target;
607         }
608
609         public ActionCallInstruction(MethodInfo target) {
610             _target = (Action<T0, T1, T2, T3, T4, T5, T6, T7>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6, T7>));
611         }
612
613         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) {
614             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7));
615             return null;
616         }
617
618         public override int Run(InterpretedFrame frame) {
619             _target((T0)frame.Data[frame.StackIndex - 8], (T1)frame.Data[frame.StackIndex - 7], (T2)frame.Data[frame.StackIndex - 6], (T3)frame.Data[frame.StackIndex - 5], (T4)frame.Data[frame.StackIndex - 4], (T5)frame.Data[frame.StackIndex - 3], (T6)frame.Data[frame.StackIndex - 2], (T7)frame.Data[frame.StackIndex - 1]);
620             frame.StackIndex -= 8;
621             return 1;
622         }
623     }
624
625     internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8> : CallInstruction {
626         private readonly Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> _target;
627         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
628         public override int ArgumentCount { get { return 9; } }
629
630         public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> target) {
631             _target = target;
632         }
633
634         public ActionCallInstruction(MethodInfo target) {
635             _target = (Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>));
636         }
637
638         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) {
639             _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7), arg8 != null ? (T8)arg8 : default(T8));
640             return null;
641         }
642
643         public override int Run(InterpretedFrame frame) {
644             _target((T0)frame.Data[frame.StackIndex - 9], (T1)frame.Data[frame.StackIndex - 8], (T2)frame.Data[frame.StackIndex - 7], (T3)frame.Data[frame.StackIndex - 6], (T4)frame.Data[frame.StackIndex - 5], (T5)frame.Data[frame.StackIndex - 4], (T6)frame.Data[frame.StackIndex - 3], (T7)frame.Data[frame.StackIndex - 2], (T8)frame.Data[frame.StackIndex - 1]);
645             frame.StackIndex -= 9;
646             return 1;
647         }
648     }
649
650     internal sealed class FuncCallInstruction<TRet> : CallInstruction {
651         private readonly Func<TRet> _target;
652         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
653         public override int ArgumentCount { get { return 0; } }
654
655         public FuncCallInstruction(Func<TRet> target) {
656             _target = target;
657         }
658
659         public FuncCallInstruction(MethodInfo target) {
660             _target = (Func<TRet>)target.CreateDelegate(typeof(Func<TRet>));
661         }
662
663         public override object Invoke() {
664             return _target();
665         }
666
667         public override int Run(InterpretedFrame frame) {
668             frame.Data[frame.StackIndex - 0] = _target();
669             frame.StackIndex -= -1;
670             return 1;
671         }
672     }
673
674     internal sealed class FuncCallInstruction<T0, TRet> : CallInstruction {
675         private readonly Func<T0, TRet> _target;
676         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
677         public override int ArgumentCount { get { return 1; } }
678
679         public FuncCallInstruction(Func<T0, TRet> target) {
680             _target = target;
681         }
682
683         public FuncCallInstruction(MethodInfo target) {
684             _target = (Func<T0, TRet>)target.CreateDelegate(typeof(Func<T0, TRet>));
685         }
686
687         public override object Invoke(object arg0) {
688             return _target(arg0 != null ? (T0)arg0 : default(T0));
689         }
690
691         public override int Run(InterpretedFrame frame) {
692             frame.Data[frame.StackIndex - 1] = _target((T0)frame.Data[frame.StackIndex - 1]);
693             frame.StackIndex -= 0;
694             return 1;
695         }
696     }
697
698     internal sealed class FuncCallInstruction<T0, T1, TRet> : CallInstruction {
699         private readonly Func<T0, T1, TRet> _target;
700         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
701         public override int ArgumentCount { get { return 2; } }
702
703         public FuncCallInstruction(Func<T0, T1, TRet> target) {
704             _target = target;
705         }
706
707         public FuncCallInstruction(MethodInfo target) {
708             _target = (Func<T0, T1, TRet>)target.CreateDelegate(typeof(Func<T0, T1, TRet>));
709         }
710
711         public override object Invoke(object arg0, object arg1) {
712             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1));
713         }
714
715         public override int Run(InterpretedFrame frame) {
716             frame.Data[frame.StackIndex - 2] = _target((T0)frame.Data[frame.StackIndex - 2], (T1)frame.Data[frame.StackIndex - 1]);
717             frame.StackIndex -= 1;
718             return 1;
719         }
720     }
721
722     internal sealed class FuncCallInstruction<T0, T1, T2, TRet> : CallInstruction {
723         private readonly Func<T0, T1, T2, TRet> _target;
724         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
725         public override int ArgumentCount { get { return 3; } }
726
727         public FuncCallInstruction(Func<T0, T1, T2, TRet> target) {
728             _target = target;
729         }
730
731         public FuncCallInstruction(MethodInfo target) {
732             _target = (Func<T0, T1, T2, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, TRet>));
733         }
734
735         public override object Invoke(object arg0, object arg1, object arg2) {
736             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2));
737         }
738
739         public override int Run(InterpretedFrame frame) {
740             frame.Data[frame.StackIndex - 3] = _target((T0)frame.Data[frame.StackIndex - 3], (T1)frame.Data[frame.StackIndex - 2], (T2)frame.Data[frame.StackIndex - 1]);
741             frame.StackIndex -= 2;
742             return 1;
743         }
744     }
745
746     internal sealed class FuncCallInstruction<T0, T1, T2, T3, TRet> : CallInstruction {
747         private readonly Func<T0, T1, T2, T3, TRet> _target;
748         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
749         public override int ArgumentCount { get { return 4; } }
750
751         public FuncCallInstruction(Func<T0, T1, T2, T3, TRet> target) {
752             _target = target;
753         }
754
755         public FuncCallInstruction(MethodInfo target) {
756             _target = (Func<T0, T1, T2, T3, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, TRet>));
757         }
758
759         public override object Invoke(object arg0, object arg1, object arg2, object arg3) {
760             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3));
761         }
762
763         public override int Run(InterpretedFrame frame) {
764             frame.Data[frame.StackIndex - 4] = _target((T0)frame.Data[frame.StackIndex - 4], (T1)frame.Data[frame.StackIndex - 3], (T2)frame.Data[frame.StackIndex - 2], (T3)frame.Data[frame.StackIndex - 1]);
765             frame.StackIndex -= 3;
766             return 1;
767         }
768     }
769
770     internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, TRet> : CallInstruction {
771         private readonly Func<T0, T1, T2, T3, T4, TRet> _target;
772         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
773         public override int ArgumentCount { get { return 5; } }
774
775         public FuncCallInstruction(Func<T0, T1, T2, T3, T4, TRet> target) {
776             _target = target;
777         }
778
779         public FuncCallInstruction(MethodInfo target) {
780             _target = (Func<T0, T1, T2, T3, T4, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, TRet>));
781         }
782
783         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) {
784             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4));
785         }
786
787         public override int Run(InterpretedFrame frame) {
788             frame.Data[frame.StackIndex - 5] = _target((T0)frame.Data[frame.StackIndex - 5], (T1)frame.Data[frame.StackIndex - 4], (T2)frame.Data[frame.StackIndex - 3], (T3)frame.Data[frame.StackIndex - 2], (T4)frame.Data[frame.StackIndex - 1]);
789             frame.StackIndex -= 4;
790             return 1;
791         }
792     }
793
794     internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, TRet> : CallInstruction {
795         private readonly Func<T0, T1, T2, T3, T4, T5, TRet> _target;
796         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
797         public override int ArgumentCount { get { return 6; } }
798
799         public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, TRet> target) {
800             _target = target;
801         }
802
803         public FuncCallInstruction(MethodInfo target) {
804             _target = (Func<T0, T1, T2, T3, T4, T5, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, TRet>));
805         }
806
807         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) {
808             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5));
809         }
810
811         public override int Run(InterpretedFrame frame) {
812             frame.Data[frame.StackIndex - 6] = _target((T0)frame.Data[frame.StackIndex - 6], (T1)frame.Data[frame.StackIndex - 5], (T2)frame.Data[frame.StackIndex - 4], (T3)frame.Data[frame.StackIndex - 3], (T4)frame.Data[frame.StackIndex - 2], (T5)frame.Data[frame.StackIndex - 1]);
813             frame.StackIndex -= 5;
814             return 1;
815         }
816     }
817
818     internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, TRet> : CallInstruction {
819         private readonly Func<T0, T1, T2, T3, T4, T5, T6, TRet> _target;
820         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
821         public override int ArgumentCount { get { return 7; } }
822
823         public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, TRet> target) {
824             _target = target;
825         }
826
827         public FuncCallInstruction(MethodInfo target) {
828             _target = (Func<T0, T1, T2, T3, T4, T5, T6, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, TRet>));
829         }
830
831         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) {
832             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6));
833         }
834
835         public override int Run(InterpretedFrame frame) {
836             frame.Data[frame.StackIndex - 7] = _target((T0)frame.Data[frame.StackIndex - 7], (T1)frame.Data[frame.StackIndex - 6], (T2)frame.Data[frame.StackIndex - 5], (T3)frame.Data[frame.StackIndex - 4], (T4)frame.Data[frame.StackIndex - 3], (T5)frame.Data[frame.StackIndex - 2], (T6)frame.Data[frame.StackIndex - 1]);
837             frame.StackIndex -= 6;
838             return 1;
839         }
840     }
841
842     internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, TRet> : CallInstruction {
843         private readonly Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> _target;
844         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
845         public override int ArgumentCount { get { return 8; } }
846
847         public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> target) {
848             _target = target;
849         }
850
851         public FuncCallInstruction(MethodInfo target) {
852             _target = (Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet>));
853         }
854
855         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) {
856             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7));
857         }
858
859         public override int Run(InterpretedFrame frame) {
860             frame.Data[frame.StackIndex - 8] = _target((T0)frame.Data[frame.StackIndex - 8], (T1)frame.Data[frame.StackIndex - 7], (T2)frame.Data[frame.StackIndex - 6], (T3)frame.Data[frame.StackIndex - 5], (T4)frame.Data[frame.StackIndex - 4], (T5)frame.Data[frame.StackIndex - 3], (T6)frame.Data[frame.StackIndex - 2], (T7)frame.Data[frame.StackIndex - 1]);
861             frame.StackIndex -= 7;
862             return 1;
863         }
864     }
865
866     internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> : CallInstruction {
867         private readonly Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> _target;
868         public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
869         public override int ArgumentCount { get { return 9; } }
870
871         public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> target) {
872             _target = target;
873         }
874
875         public FuncCallInstruction(MethodInfo target) {
876             _target = (Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>));
877         }
878
879         public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) {
880             return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7), arg8 != null ? (T8)arg8 : default(T8));
881         }
882
883         public override int Run(InterpretedFrame frame) {
884             frame.Data[frame.StackIndex - 9] = _target((T0)frame.Data[frame.StackIndex - 9], (T1)frame.Data[frame.StackIndex - 8], (T2)frame.Data[frame.StackIndex - 7], (T3)frame.Data[frame.StackIndex - 6], (T4)frame.Data[frame.StackIndex - 5], (T5)frame.Data[frame.StackIndex - 4], (T6)frame.Data[frame.StackIndex - 3], (T7)frame.Data[frame.StackIndex - 2], (T8)frame.Data[frame.StackIndex - 1]);
885             frame.StackIndex -= 8;
886             return 1;
887         }
888     }
889
890     internal sealed partial class MethodInfoCallInstruction : CallInstruction {
891         public override object Invoke() {
892             return InvokeWorker();
893         }
894         public override object Invoke(object arg0) {
895             return InvokeWorker(arg0);
896         }
897         public override object Invoke(object arg0, object arg1) {
898             return InvokeWorker(arg0, arg1);
899         }
900     }
901
902     // *** END GENERATED CODE ***
903
904     #endregion
905 }