Example #1
0
 /// <summary>
 /// Creates a <see cref="ComponentParameter"/> with an <see cref="Microsoft.AspNetCore.Components.EventCallback"/> as parameter value for this <see cref="TestContext"/> and
 /// <paramref name="callback"/>.
 /// </summary>
 /// <param name="name">Parameter name.</param>
 /// <param name="callback">The event callback.</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter EventCallback <TValue>(string name, Func <TValue, Task> callback)
 => ComponentParameterFactory.EventCallback <TValue>(name, callback);
Example #2
0
 /// <summary>
 /// Creates a <see cref="ComponentParameter"/> with an <see cref="Microsoft.AspNetCore.Components.EventCallback"/> as parameter value for this <see cref="TestContext"/> and
 /// <paramref name="callback"/>.
 /// </summary>
 /// <param name="name">Parameter name.</param>
 /// <param name="callback">The event callback.</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter EventCallback(string name, Func <object, Task> callback)
 => ComponentParameterFactory.EventCallback(name, callback);
Example #3
0
 /// <summary>
 /// Creates a <see cref="ComponentParameter"/> with an <see cref="Microsoft.AspNetCore.Components.EventCallback"/> as parameter value for this <see cref="TestContext"/> and
 /// <paramref name="callback"/>.
 /// </summary>
 /// <param name="name">Parameter name.</param>
 /// <param name="callback">The event callback.</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter EventCallback <TValue>(string name, Action <TValue> callback)
 => ComponentParameterFactory.EventCallback <TValue>(name, callback);
Example #4
0
 /// <summary>
 /// Creates a <see cref="ComponentParameter"/> with an <see cref="Microsoft.AspNetCore.Components.EventCallback"/> as parameter value for this <see cref="TestContext"/> and
 /// <paramref name="callback"/>.
 /// </summary>
 /// <param name="name">Parameter name.</param>
 /// <param name="callback">The event callback.</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter EventCallback(string name, Action <object> callback)
 => ComponentParameterFactory.EventCallback(name, callback);