Beispiel #1
0
 /// <summary>
 /// Returns a switch input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.
 /// </summary>
 ///
 /// <returns>
 /// A switch input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.
 /// </returns>
 /// <param name="formGroup">The IFormGroup instance that this method extends.</param>
 /// <param name="expression">An expression that identifies the object that contains the properties to render.</param>
 /// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element.</param>
 /// <typeparam name="TModel">The type of the model.</typeparam>
 public static YimaFormSwitch <TModel> YimaSwitchFor <TModel>(this IFormGroup <TModel> formGroup, Expression <Func <TModel, bool> > expression, object htmlAttributes)
 {
     return(formGroup.YimaSwitchFor <TModel>(expression, (IDictionary <string, object>)HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)));
 }
Beispiel #2
0
 /// <summary>
 /// Returns a switch input element for each property in the object that is represented by the specified expression.
 /// </summary>
 ///
 /// <returns>
 /// A switch input element for each property in the object that is represented by the specified expression.
 /// </returns>
 /// <param name="formGroup">The IFormGroup instance that this method extends.</param>
 /// <param name="expression">An expression that identifies the object that contains the properties to render.</param>
 /// <typeparam name="TModel">The type of the model.</typeparam>
 public static YimaFormSwitch <TModel> YimaSwitchFor <TModel>(this IFormGroup <TModel> formGroup, Expression <Func <TModel, bool> > expression)
 {
     return(formGroup.YimaSwitchFor <TModel>(expression, (IDictionary <string, object>)null));
 }