Beispiel #1
0
 public static bool IsInputElementBindTagHelper(this TagHelperDescriptor tagHelper)
 {
     return
         (tagHelper.IsBindTagHelper() &&
          tagHelper.TagMatchingRules.Count == 1 &&
          string.Equals("input", tagHelper.TagMatchingRules[0].TagName));
 }
Beispiel #2
0
 public static bool IsFallbackBindTagHelper(this TagHelperDescriptor tagHelper)
 {
     return
         (tagHelper.IsBindTagHelper() &&
          tagHelper.Metadata.TryGetValue(ComponentMetadata.Bind.FallbackKey, out var fallback) &&
          string.Equals(bool.TrueString, fallback));
 }
        public static bool IsInputElementBindTagHelper(this TagHelperDescriptor tagHelper)
        {
            if (tagHelper == null)
            {
                throw new ArgumentNullException(nameof(tagHelper));
            }

            return
                (tagHelper.IsBindTagHelper() &&
                 tagHelper.TagMatchingRules.Count == 1 &&
                 string.Equals("input", tagHelper.TagMatchingRules[0].TagName));
        }
        public static bool IsFallbackBindTagHelper(this TagHelperDescriptor tagHelper)
        {
            if (tagHelper == null)
            {
                throw new ArgumentNullException(nameof(tagHelper));
            }

            return
                (tagHelper.IsBindTagHelper() &&
                 tagHelper.Metadata.TryGetValue(BlazorMetadata.Bind.FallbackKey, out var fallback) &&
                 string.Equals(bool.TrueString, fallback));
        }