private static ThreadComposer MapIssuer(GDBD.Workers.TemplateComposerWorker <Type, ProducerIteratorMapping> v) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 Type workerTest = v.workerTest; string[] names = Enum.GetNames(workerTest); string[] array = new string[names.Length]; ulong[] array2 = new ulong[names.Length]; for (int i = 0; i < names.Length; i++) { string text = names[i]; FieldInfo field = workerTest.GetField(text, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); array2[i] = StopIssuer(field.GetValue(null)); string text2 = (from EnumMemberAttribute reference in field.GetCustomAttributes(typeof(EnumMemberAttribute), inherit: true) select reference.Value).SingleOrDefault(); bool setattr = text2 != null; if (text2 == null) { text2 = text; } string text3 = text2; if (Array.IndexOf(array, text3, 0, i) != -1) { throw new InvalidOperationException("Enum name '{0}' already exists on enum '{1}'.".SelectReader(CultureInfo.InvariantCulture, text3, workerTest.Name)); } array[i] = ((v._AdvisorTest != null) ? v._AdvisorTest._0001(text3, setattr) : text3); } return(new ThreadComposer(workerTest.IsDefined(typeof(FlagsAttribute), inherit: false), array2, names, array)); }
private Type RemoveClient(GDBD.Workers.TemplateComposerWorker <string, string> res) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 string workerTest = res.workerTest; string advisorTest = res._AdvisorTest; if (workerTest != null) { Assembly assembly = Assembly.LoadWithPartialName(workerTest); if (assembly == null) { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly2 in assemblies) { if (assembly2.FullName == workerTest || assembly2.GetName().Name == workerTest) { assembly = assembly2; break; } } } if (assembly == null) { throw new StrategyError("Could not load assembly '{0}'.".ListReader(CultureInfo.InvariantCulture, workerTest)); } Type type = assembly.GetType(advisorTest); if (type == null) { if (advisorTest.IndexOf('`') >= 0) { try { type = PostClient(advisorTest, assembly); } catch (Exception second) { throw new StrategyError("Could not find type '{0}' in assembly '{1}'.".SelectReader(CultureInfo.InvariantCulture, advisorTest, assembly.FullName), second); } } if (type == null) { throw new StrategyError("Could not find type '{0}' in assembly '{1}'.".SelectReader(CultureInfo.InvariantCulture, advisorTest, assembly.FullName)); } } return(type); } return(Type.GetType(advisorTest)); }
private Type PostClient(string res, Assembly pol) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 Type result = null; int num = res.IndexOf('['); if (num >= 0) { string name = res.Substring(0, num); Type type = pol.GetType(name); if (type != null) { List <Type> list = new List <Type>(); int num2 = 0; int num3 = 0; int num4 = res.Length - 1; for (int i = num + 1; i < num4; i++) { switch (res[i]) { case '[': if (num2 == 0) { num3 = i + 1; } num2++; break; case ']': num2--; if (num2 == 0) { GDBD.Workers.TemplateComposerWorker <string, string> first = ResolverErrorFilter.IncludeReader(res.Substring(num3, i - num3)); list.Add(ChangeClient(first)); } break; } } result = type.MakeGenericType(list.ToArray()); } } return(result); }
private static Func <object, object> FillProperty(GDBD.Workers.TemplateComposerWorker <Type, Type> init) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 Type workerTest = init.workerTest; Type advisorTest = init._AdvisorTest; MethodInfo methodInfo = advisorTest.GetMethod("op_Implicit", new Type[1] { workerTest }) ?? advisorTest.GetMethod("op_Explicit", new Type[1] { workerTest }); if (methodInfo == null) { return(null); } Newtonsoft.Rules.ClientInstanceRule <object, object> clientInstanceRule = ConfigProperty._0001()._0001 <object>(methodInfo); return((object P_0) => clientInstanceRule(null, new object[1] { P_0 })); }
private Type ChangeClient(GDBD.Workers.TemplateComposerWorker <string, string> first) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 return(fieldTest.InitReader(first)); }