Exemple #1
0
 public static ModelMetadataItemBuilder <string> AsMultilineText([NotNull] this ModelMetadataItemBuilder <string> self)
 {
     return(self.Template("MultilineText"));
 }
Exemple #2
0
 public static ModelMetadataItemBuilder <string> AsPassword([NotNull] this ModelMetadataItemBuilder <string> self)
 {
     return(self.Template("Password"));
 }
Exemple #3
0
 public static ModelMetadataItemBuilder <TValue> AsListBox <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey, [AspMvcEditorTemplate, AspMvcDisplayTemplate] string template)
 {
     return(HtmlSelect(self, template, viewDataKey, null));
 }
Exemple #4
0
 public static ModelMetadataItemBuilder <string> AsHtml([NotNull] this ModelMetadataItemBuilder <string> self)
 {
     return(self.Template("Html"));
 }
        public static ModelMetadataItemBuilder <DateTime?> FormatAsTimeOnly([NotNull] this ModelMetadataItemBuilder <DateTime?> instance)
        {
            //Invariant.IsNotNull(instance, "instance");

            return(instance.Format("{0:t}"));
        }
Exemple #6
0
 public static ModelMetadataItemBuilder <TValue> AsListBox <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey)
 {
     return(self.AsListBox(viewDataKey, "ListBox"));
 }
Exemple #7
0
 public static ModelMetadataItemBuilder <TValue> AsDropDownList <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey, Func <string> optionLabel)
 {
     return(self.AsDropDownList(viewDataKey, optionLabel, "DropDownList"));
 }
Exemple #8
0
 public static ModelMetadataItemBuilder <string> MaximumLength([NotNull] this ModelMetadataItemBuilder <string> self, int length)
 {
     return(MaximumLength(self, length, null, null, null));
 }
Exemple #9
0
 public static ModelMetadataItemBuilder <TModel> RenderAction <TModel>([NotNull] this ModelMetadataItemBuilder <TModel> self, [AspMvcAction] string actionName, RouteValueDictionary routeValues)
 {
     return(RenderAction(self, html => html.Action(actionName, new RouteValueDictionary(routeValues))));
 }
Exemple #10
0
 public static ModelMetadataItemBuilder <TValue> AsDropDownList <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey)
 {
     return(self.AsDropDownList(viewDataKey, (Func <string>)null));
 }
Exemple #11
0
 public static ModelMetadataItemBuilder <TModel> RenderAction <TModel>([NotNull] this ModelMetadataItemBuilder <TModel> self, [AspMvcAction] string actionName, [AspMvcController] string controllerName)
 {
     return(RenderAction(self, html => html.Action(actionName, controllerName)));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="self"></param>
 /// <param name="configure"></param>
 /// <param name="errorMessageResourceName"></param>
 /// <param name="errorMessageResourceType"></param>
 /// <typeparam name="TValue"></typeparam>
 /// <returns></returns>
 public static ModelMetadataItemBuilder <TValue> Remote <TValue>(this ModelMetadataItemBuilder <TValue> self, [NotNull] Func <RemoteValidationConfigurator <TValue>, AbstractRemoteValidationConfigurator <TValue> > configure, string errorMessageResourceName, Type errorMessageResourceType)
 {
     return(Remote(self, configure, null, errorMessageResourceName, errorMessageResourceType));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="self"></param>
 /// <param name="configure"></param>
 /// <param name="errorMessage"></param>
 /// <typeparam name="TValue"></typeparam>
 /// <returns></returns>
 public static ModelMetadataItemBuilder <TValue> Remote <TValue>(this ModelMetadataItemBuilder <TValue> self, [NotNull] Func <RemoteValidationConfigurator <TValue>, AbstractRemoteValidationConfigurator <TValue> > configure, Func <string> errorMessage)
 {
     return(Remote(self, configure, errorMessage, null, null));
 }
Exemple #14
0
 public static ModelMetadataItemBuilder <string> Expression([NotNull] this ModelMetadataItemBuilder <string> self, string pattern, Func <string> errorMessage)
 {
     return(Expression(self, pattern, errorMessage, null, null));
 }
Exemple #15
0
 public static ModelMetadataItemBuilder <TValue> AsDropDownList <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey, string optionLabel, [AspMvcEditorTemplate, AspMvcDisplayTemplate] string template)
 {
     return(self.AsDropDownList(viewDataKey, () => optionLabel, template));
 }
Exemple #16
0
 public static ModelMetadataItemBuilder <string> Expression([NotNull] this ModelMetadataItemBuilder <string> self, string pattern, Type errorMessageResourceType, string errorMessageResourceName)
 {
     return(Expression(self, pattern, null, errorMessageResourceType, errorMessageResourceName));
 }
Exemple #17
0
 public static ModelMetadataItemBuilder <TValue> AsDropDownList <TValue>([NotNull] this ModelMetadataItemBuilder <TValue> self, string viewDataKey, Func <string> optionLabel, [AspMvcEditorTemplate, AspMvcDisplayTemplate] string template)
 {
     return(HtmlSelect(self, template, viewDataKey, optionLabel));
 }
Exemple #18
0
 public static ModelMetadataItemBuilder <string> MaximumLength([NotNull] this ModelMetadataItemBuilder <string> self, int length, Func <string> errorMessage)
 {
     return(MaximumLength(self, length, errorMessage, null, null));
 }
        public static ModelMetadataItemBuilder <decimal?> FormatAsCurrency([NotNull] this ModelMetadataItemBuilder <decimal?> instance)
        {
            //Invariant.IsNotNull(instance, "instance");

            return(instance.Format("{0:c}"));
        }