Exemple #1
0
    public override void FormatNode(IntermediateNodeFormatter formatter)
    {
        formatter.WriteContent(AttributeName);

        formatter.WriteProperty(nameof(AttributeName), AttributeName);
        formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString());
    }
 private void Search(AttributeStructure data, string pathInTree)
 {
     // exclude the tuning-file
     if (pathInTree == "simulation\\attrib\\tuning\\tuning_info.rbf")
     {
         return;
     }
     foreach (var attribValue in data.Root)
     {
         if (attribValue.DataType != AttributeDataType.String)
         {
             continue;
         }
         string attribData = attribValue.Data as string;
         if (string.IsNullOrWhiteSpace(attribData))
         {
             continue;
         }
         // exclude file references
         if (!attribData.ContainsAny('\\', '/'))
         {
             DictEntry entry;
             if (!m_results.TryGetValue(attribValue.Key, out entry))
             {
                 entry = new DictEntry(attribValue.Key);
                 m_results.Add(entry.Key, entry);
             }
             if (!entry.Options.Contains(attribData))
             {
                 entry.Options.Add(attribData);
             }
         }
     }
 }
 private void Search(AttributeStructure data, string pathInTree)
 {
     // exclude the tuning-file
     if (pathInTree == "simulation\\attrib\\tuning\\tuning_info.rbf")
         return;
     foreach (var attribValue in data.Root)
     {
         if (attribValue.DataType != AttributeDataType.String)
             continue;
         string attribData = attribValue.Data as string;
         if (string.IsNullOrWhiteSpace(attribData))
             continue;
         // exclude file references
         if (!attribData.ContainsAny('\\', '/'))
         {
             DictEntry entry;
             if (!m_results.TryGetValue(attribValue.Key, out entry))
             {
                 entry = new DictEntry(attribValue.Key);
                 m_results.Add(entry.Key, entry);
             }
             if (!entry.Options.Contains(attribData))
                 entry.Options.Add(attribData);
         }
     }
 }
Exemple #4
0
 private void ScanFile(AttributeStructure data, string pathInFileTree)
 {
     foreach (AttributeValue attribValue in data.Root)
     {
         ScanValue(attribValue);
     }
 }
Exemple #5
0
 public TagHelperAttributeInfo(
     string name,
     AttributeStructure attributeStructure,
     bool bound)
 {
     Name = name;
     AttributeStructure = attributeStructure;
     Bound = bound;
 }
Exemple #6
0
        public override void FormatNode(IntermediateNodeFormatter formatter)
        {
            formatter.WriteContent(AttributeName);

            formatter.WriteProperty(nameof(AttributeName), AttributeName);
            formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString());
            formatter.WriteProperty(nameof(BoundAttribute), BoundAttribute?.DisplayName);
            formatter.WriteProperty(nameof(IsIndexerNameMatch), IsIndexerNameMatch.ToString());
            formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName);
        }
    public override void FormatNode(IntermediateNodeFormatter formatter)
    {
        formatter.WriteContent(AttributeName);

        formatter.WriteProperty(nameof(AttributeName), AttributeName);
        formatter.WriteProperty(nameof(OriginalAttributeName), OriginalAttributeName);
        formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString());
        formatter.WriteProperty(nameof(BoundAttribute), BoundAttribute?.DisplayName);
        formatter.WriteProperty(nameof(BoundAttributeParameter), BoundAttributeParameter?.DisplayName);
        formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName);
    }
Exemple #8
0
 public TagHelperAttributeInfo(
     string name,
     string parameterName,
     AttributeStructure attributeStructure,
     bool bound,
     bool isDirectiveAttribute)
 {
     Name                 = name;
     ParameterName        = parameterName;
     AttributeStructure   = attributeStructure;
     Bound                = bound;
     IsDirectiveAttribute = isDirectiveAttribute;
 }
Exemple #9
0
        public override void FormatNode(IntermediateNodeFormatter formatter)
        {
            if (formatter == null)
            {
                throw new ArgumentNullException(nameof(formatter));
            }

            formatter.WriteContent(AttributeName);

            formatter.WriteProperty(nameof(AttributeName), AttributeName);
            formatter.WriteProperty(nameof(AttributeStructure), AttributeStructure.ToString());
            formatter.WriteProperty(nameof(BoundAttribute), BoundAttribute?.DisplayName);
            formatter.WriteProperty(nameof(PropertyName), PropertyName);
            formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName);
            formatter.WriteProperty(nameof(TypeName), TypeName);
        }
        private void Search(AttributeStructure data, string pathInTree)
        {
            IEnumerable<AttributeValue> attribValues = data.Root.Where(SatisfiesCondition);

            SearchResult result;
            if (!m_results.TryGetValue(pathInTree, out result))
            {
                result = new SearchResult(pathInTree);
                m_results.Add(pathInTree, result);
            }
            result.AddValues(attribValues);
            if (result.Values.Count == 0)
                return;
            MethodInvoker adder = () => m_lbxSearchResults.Items.Add(result);
            Invoke(adder);
        }
        internal static void TagHelperHtmlAttribute(
            string name,
            AttributeStructure valueStyle,
            IntermediateNode node,
            params Action <IntermediateNode>[] valueValidators)
        {
            var tagHelperHtmlAttribute = Assert.IsType <TagHelperHtmlAttributeIntermediateNode>(node);

            try
            {
                Assert.Equal(name, tagHelperHtmlAttribute.AttributeName);
                Assert.Equal(valueStyle, tagHelperHtmlAttribute.AttributeStructure);
                Children(tagHelperHtmlAttribute, valueValidators);
            }
            catch (XunitException e)
            {
                throw new IntermediateNodeAssertException(tagHelperHtmlAttribute, tagHelperHtmlAttribute.Children, e.Message, e);
            }
        }
        internal static void PreallocatedTagHelperPropertyValue(
            IntermediateNode node,
            string attributeName,
            string value,
            AttributeStructure valueStyle)
        {
            var propertyValueNode = Assert.IsType <PreallocatedTagHelperPropertyValueIntermediateNode>(node);

            try
            {
                Assert.Equal(attributeName, propertyValueNode.AttributeName);
                Assert.Equal(value, propertyValueNode.Value);
                Assert.Equal(valueStyle, propertyValueNode.AttributeStructure);
            }
            catch (XunitException e)
            {
                throw new IntermediateNodeAssertException(propertyValueNode, e.Message);
            }
        }
        private void Search(AttributeStructure data, string pathInTree)
        {
            IEnumerable <AttributeValue> attribValues = data.Root.Where(SatisfiesCondition);

            SearchResult result;

            if (!m_results.TryGetValue(pathInTree, out result))
            {
                result = new SearchResult(pathInTree);
                m_results.Add(pathInTree, result);
            }
            result.AddValues(attribValues);
            if (result.Values.Count == 0)
            {
                return;
            }
            MethodInvoker adder = () => m_lbxSearchResults.Items.Add(result);

            Invoke(adder);
        }
        internal static void SetTagHelperProperty(
            string name,
            string propertyName,
            AttributeStructure valueStyle,
            IntermediateNode node,
            params Action <IntermediateNode>[] valueValidators)
        {
            var propertyNode = Assert.IsType <TagHelperPropertyIntermediateNode>(node);

            try
            {
                Assert.Equal(name, propertyNode.AttributeName);
                Assert.Equal(propertyName, propertyNode.BoundAttribute.GetPropertyName());
                Assert.Equal(valueStyle, propertyNode.AttributeStructure);
                Children(propertyNode, valueValidators);
            }
            catch (XunitException e)
            {
                throw new IntermediateNodeAssertException(propertyNode, propertyNode.Children, e.Message, e);
            }
        }
 public TagHelperAttributeNode(string name, SyntaxNode value, AttributeStructure attributeStructure)
 {
     Name  = name;
     Value = value;
     AttributeStructure = attributeStructure;
 }
 private void ScanFile(AttributeStructure data, string pathInFileTree)
 {
     foreach (AttributeValue attribValue in data.Root)
         ScanValue(attribValue);
 }