Hiro.Compilers.MethodBuilderOptions.SetMethodParameters C# (CSharp) Method

SetMethodParameters() public method

Assigns parameters to the target method.
public SetMethodParameters ( ) : void
return void
        public void SetMethodParameters(params System.Type[] parameterTypes)
        {
            ParameterTypes = parameterTypes;
        }

Usage Example

 /// <summary>
 /// Sets the default method options for the GetServiceHashCode method.
 /// </summary>
 /// <param name="targetType">The targe type.</param>
 /// <param name="shouldBeVisible">A boolean flag that determines whether or not the method should be publicly visible.</param>
 /// <param name="options">The <see cref="MethodBuilderOptions"/> object to be modified.</param>
 private static void DefineOptions(TypeDefinition targetType, bool shouldBeVisible, MethodBuilderOptions options)
 {
     options.HostType = targetType;
     options.MethodName = "GetServiceHashCode";
     options.ReturnType = typeof(int);
     options.SetMethodParameters(typeof(Type), typeof(string));
     options.IsPublic = shouldBeVisible;
     options.IsStatic = true;
 }
All Usage Examples Of Hiro.Compilers.MethodBuilderOptions::SetMethodParameters
MethodBuilderOptions