Hallo, i want to find out if "viewClass" parent class from local variables is. Please help.
TypeDefinition viewClass = helperAssembly.Types?.Where(t => t.IsClass && t.Name.Equals(Constants.AdvScreen, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault(); if (types != null && types.Any()) { foreach (TypeDefinition type in types) { Collection<MethodDefinition> methods = type.Methods; // GetMethods(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); if (methods != null && methods.Any()) { foreach (MethodDefinition method in methods) { Mono.Cecil.Cil.MethodBody methodBody = method.Body; if (methodBody != null && methodBody.Variables != null && methodBody.Variables.Any()) { foreach (VariableDefinition variable in methodBody.Variables) { TypeReference variableType = variable.VariableType; if (variableType != null) { //bool isSubClass = variableType.base(viewClass); //if (isSubClass) //{ // MethodInfo[] methodInfo = variableType.GetMethods(); // if (methodInfo != null && methodInfo.Any()) // { // views.Add(new ViewObject { View = variableType, Methods = methodInfo }); // } //} } } } } } } } -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to mono-cecil+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.