コード例 #1
0
 /// <summary>
 /// Specifies a method with the specified name, returning void, and taking the given parameter types
 /// </summary>
 /// <param name="name">Name of the method</param>
 /// <param name="param1">Settings for the first method parameter</param>
 /// <param name="param2">Settings for the second method parameter</param>
 /// <param name="param3">Settings for the third method parameter</param>
 /// <param name="param4">Settings for the fourth method parameter</param>
 /// <typeparam name="T1">Method's first parameter type</typeparam>
 /// <typeparam name="T2">Method's second parameter type</typeparam>
 /// <typeparam name="T3">Method's third parameter type</typeparam>
 /// <typeparam name="T4">Method's fourth parameter type</typeparam>
 /// <returns>Method's behavior</returns>
 public MethodActionBehavior <TComponent, T1, T2, T3, T4> WithActionSignature <T1, T2, T3, T4>(string name, ParamSettings param1 = null, ParamSettings param2 = null, ParamSettings param3 = null, ParamSettings param4 = null)
 => WithSignature <MethodActionBehavior <TComponent, T1, T2, T3, T4> >(name, param1.OfType <T1>(), param2.OfType <T2>(), param3.OfType <T3>(), param4.OfType <T4>());
コード例 #2
0
 /// <summary>
 /// Specifies a method with the specified name, returning a given type, and taking the given parameter types
 /// </summary>
 /// <param name="name">Name of the method</param>
 /// <param name="param1">Settings for the first method parameter</param>
 /// <param name="param2">Settings for the second method parameter</param>
 /// <param name="param3">Settings for the third method parameter</param>
 /// <param name="param4">Settings for the fourth method parameter</param>
 /// <param name="param5">Settings for the fifth method parameter</param>
 /// <param name="param6">Settings for the sixth method parameter</param>
 /// <typeparam name="T1">Method's first parameter type</typeparam>
 /// <typeparam name="T2">Method's second parameter type</typeparam>
 /// <typeparam name="T3">Method's third parameter type</typeparam>
 /// <typeparam name="T4">Method's fourth parameter type</typeparam>
 /// <typeparam name="T5">Method's fifth parameter type</typeparam>
 /// <typeparam name="T6">Method's sixth parameter type</typeparam>
 /// <typeparam name="TReturn">Method's return type</typeparam>
 /// <returns>Method's behavior</returns>
 public MethodFunctionBehavior <TComponent, T1, T2, T3, T4, T5, T6, TReturn> WithFunctionSignature <T1, T2, T3, T4, T5, T6, TReturn>(string name, ParamSettings param1 = null, ParamSettings param2 = null, ParamSettings param3 = null, ParamSettings param4 = null, ParamSettings param5 = null, ParamSettings param6 = null)
 => WithSignature <MethodFunctionBehavior <TComponent, T1, T2, T3, T4, T5, T6, TReturn> >(name, param1.OfType <T1>(), param2.OfType <T2>(), param3.OfType <T3>(), param4.OfType <T4>(), param5.OfType <T5>(), param6.OfType <T6>());
コード例 #3
0
 /// <summary>
 /// Specifies a method with the specified name, returning void, and taking the given parameter type
 /// </summary>
 /// <param name="name">Name of the method</param>
 /// <param name="param1">Settings for first method parameter</param>
 /// <typeparam name="T1">Type of the method's first parameter</typeparam>
 /// <returns>Method's behavior</returns>
 public MethodActionBehavior <TComponent, T1> WithActionSignature <T1>(string name, ParamSettings param1 = null)
 => WithSignature <MethodActionBehavior <TComponent, T1> >(name, param1.OfType <T1>());
コード例 #4
0
 /// <summary>
 /// Specifies a method with the specified name, returning a given type, and taking the given parameter types
 /// </summary>
 /// <param name="name">Name of the method</param>
 /// <param name="param1">Settings for the first method parameter</param>
 /// <param name="param2">Settings for the second method parameter</param>
 /// <typeparam name="T1">Method's first parameter type</typeparam>
 /// <typeparam name="T2">Method's second parameter type</typeparam>
 /// <typeparam name="TReturn">Method's return type</typeparam>
 /// <returns>Method's behavior</returns>
 public MethodFunctionBehavior <TComponent, T1, T2, TReturn> WithFunctionSignature <T1, T2, TReturn>(string name, ParamSettings param1 = null, ParamSettings param2 = null)
 => WithSignature <MethodFunctionBehavior <TComponent, T1, T2, TReturn> >(name, param1.OfType <T1>(), param2.OfType <T2>());