コード例 #1
0
 public static bool IsInputElementBindTagHelper(this TagHelperDescriptor tagHelper)
 {
     return
         (tagHelper.IsBindTagHelper() &&
          tagHelper.TagMatchingRules.Count == 1 &&
          string.Equals("input", tagHelper.TagMatchingRules[0].TagName));
 }
コード例 #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));
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }