Mono.Cecil.Inject.MethodDefinitionExtensions.GetInjector C# (CSharp) Method

GetInjector() public static method

Finds a method that could be used as an injection method (hook) for this method and constructs an instance of InjectionDefinition from it.
public static GetInjector ( this target, TypeDefinition injectionType, string name, InjectFlags flags = InjectFlags.None, int localsID = null ) : InjectionDefinition
target this This method that is used as a target.
injectionType TypeDefinition Type that contains the injection method (hook).
name string Name of the injection method (hook).
flags InjectFlags /// Injection flags that specify what values to pass to the injection method and how to inject it. This /// method attempts to find the hook method that satisfies all the specified flags. ///
localsID int /// An array of indicies of local variables to pass to the injection method. Used only if /// is specified, otherwise ignored. ///
return InjectionDefinition
        public static InjectionDefinition GetInjector(this MethodDefinition target,
                                                      TypeDefinition injectionType,
                                                      string name,
                                                      InjectFlags flags = InjectFlags.None,
                                                      int[] localsID = null,
                                                      params FieldDefinition[] typeFields)
        {
            return injectionType.GetInjectionMethod(name, target, flags, localsID, typeFields);
        }
MethodDefinitionExtensions