Example #1
0
 public XmlNameSyntax(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
     : base(SyntaxKind.XmlName)
 {
     SlotCount      = 2;
     this.Prefix    = prefix;
     this.LocalName = localName;
 }
 public XmlNameSyntax(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
     : base(SyntaxKind.XmlName)
 {
     SlotCount = 2;
     this.Prefix = prefix;
     this.LocalName = localName;
 }
 public XmlPrefixSyntax(
     XmlNameTokenSyntax nameToken,
     PunctuationSyntax colonToken) : base(SyntaxKind.XmlPrefix)
 {
     Name       = nameToken;
     ColonToken = colonToken;
     SlotCount  = 2;
 }
 internal static XmlProcessingInstructionSyntax XmlProcessingInstruction(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxList <SyntaxNode> toList,
     PunctuationSyntax endProcessingInstruction)
 {
     return(new XmlProcessingInstructionSyntax(beginProcessingInstruction, name, toList, endProcessingInstruction));
 }
Example #5
0
        /*  <summary>
         * ''' Represents an XML document prologue option - version, encoding, standalone or
         * ''' whitespace in an XML literal expression.
         * ''' </summary>
         */
        public static XmlDeclarationOptionSyntax XmlDeclarationOption(XmlNameTokenSyntax name, PunctuationSyntax equals, XmlStringSyntax value)
        {
            Debug.Assert(name != null && name.Kind == SyntaxKind.XmlNameToken);
            Debug.Assert(equals != null && equals.Kind == SyntaxKind.EqualsToken);
            Debug.Assert(value != null);

            return((XmlDeclarationOptionSyntax) new XmlDeclarationOptionSyntax.Green(name?.GreenNode, equals?.GreenNode, value?.GreenNode).CreateRed());
        }
Example #6
0
 public static XmlProcessingInstructionSyntax XmlProcessingInstruction(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxList <SyntaxNode> toList,
     PunctuationSyntax endProcessingInstruction)
 {
     return(XmlProcessingInstruction(beginProcessingInstruction, name, toList.Node, endProcessingInstruction));
 }
Example #7
0
 public static XmlProcessingInstructionSyntax XmlProcessingInstruction(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxNode toList,
     PunctuationSyntax endProcessingInstruction)
 {
     return((XmlProcessingInstructionSyntax) new XmlProcessingInstructionSyntax.Green(beginProcessingInstruction?.GreenNode, name?.GreenNode, toList?.GreenNode, endProcessingInstruction?.GreenNode).CreateRed());
 }
Example #8
0
 public XmlDeclarationOptionSyntax(SyntaxKind kind, XmlNameTokenSyntax name, PunctuationSyntax equals, XmlStringSyntax value)
     : base(kind)
 {
     this.Name      = name;
     this.Equals    = equals;
     this.Value     = value;
     this.SlotCount = 3;
 }
 public XmlDeclarationOptionSyntax(SyntaxKind kind, XmlNameTokenSyntax name, PunctuationSyntax equals, XmlStringSyntax value)
     : base(kind)
 {
     this.Name = name;
     this.Equals = equals;
     this.Value = value;
     this.SlotCount = 3;
 }
 public XmlPrefixSyntax(
     XmlNameTokenSyntax nameToken,
     PunctuationSyntax colonToken) : base(SyntaxKind.XmlPrefix)
 {
     Name = nameToken;
     ColonToken = colonToken;
     SlotCount = 2;
 }
Example #11
0
        public XmlPrefixSyntax Update(XmlNameTokenSyntax name, PunctuationSyntax colonToken)
        {
            if (name != this.Name || colonToken != this.ColonToken)
            {
                var newNode = SyntaxFactory.XmlPrefix(name, colonToken);
                return(newNode);
            }

            return(this);
        }
Example #12
0
        public XmlNameSyntax Update(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
        {
            if (prefix != this.PrefixNode || localName != this.LocalNameNode)
            {
                var newNode = SyntaxFactory.XmlName(prefix, localName);
                return(newNode);
            }

            return(this);
        }
Example #13
0
 public XmlProcessingInstructionSyntax(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxList <SyntaxNode> toList,
     PunctuationSyntax endProcessingInstruction)
     : base(SyntaxKind.XmlProcessingInstruction)
 {
     LessThanQuestionToken = beginProcessingInstruction;
     Name       = name;
     TextTokens = toList.Node;
     QuestionGreaterThanToken = endProcessingInstruction;
     SlotCount = 4;
 }
 public XmlProcessingInstructionSyntax(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxList<SyntaxNode> toList,
     PunctuationSyntax endProcessingInstruction)
     : base(SyntaxKind.XmlProcessingInstruction)
 {
     LessThanQuestionToken = beginProcessingInstruction;
     Name = name;
     TextTokens = toList.Node;
     QuestionGreaterThanToken = endProcessingInstruction;
     SlotCount = 4;
 }
Example #15
0
        public XmlPrefixSyntax Update(XmlNameTokenSyntax name, PunctuationSyntax colonToken)
        {
            if (name != this.Name || colonToken != this.ColonToken)
            {
                var newNode     = SyntaxFactory.XmlPrefix(name, colonToken);
                var annotations = this.GetAnnotations();
                if (annotations != null && annotations.Length > 0)
                {
                    return(newNode.WithAnnotations(annotations));
                }
                return(newNode);
            }

            return(this);
        }
Example #16
0
        public XmlNameSyntax Update(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
        {
            if (prefix != this.PrefixNode || localName != this.LocalNameNode)
            {
                var newNode     = SyntaxFactory.XmlName(prefix, localName);
                var annotations = this.GetAnnotations();
                if (annotations != null && annotations.Length > 0)
                {
                    return(newNode.WithAnnotations(annotations));
                }
                return(newNode);
            }

            return(this);
        }
Example #17
0
        /*  <summary>
         * ''' Represents an XML document prologue option - version, encoding, standalone or
         * ''' whitespace in an XML literal expression.
         * ''' </summary>
         */
        public static XmlDeclarationOptionSyntax XmlDeclarationOption(XmlNameTokenSyntax name, PunctuationSyntax equals, XmlStringSyntax value)
        {
            Debug.Assert(name != null && name.Kind == SyntaxKind.XmlNameToken);
            Debug.Assert(equals != null && equals.Kind == SyntaxKind.EqualsToken);
            Debug.Assert(value != null);
            //int hash;
            //var cached = SyntaxNodeCache.TryGetNode(SyntaxKind.XmlDeclarationOption, _factoryContext, name, equals, value, hash);
            //if (cached != null)
            //{
            //    return ((XmlDeclarationOptionSyntax)cached);
            //}

            var result = new XmlDeclarationOptionSyntax(SyntaxKind.XmlDeclarationOption, name, equals, value);

            //if (hash >= 0)
            //{
            //    SyntaxNodeCache.AddNode(result, hash);
            //}

            return(result);
        }
Example #18
0
 internal SyntaxNode MakeKeyword(XmlNameTokenSyntax xmlName)
 {
     //Debug.Assert(xmlName.PossibleKeywordKind != SyntaxKind.XmlNameToken);
     return MakeKeyword(SyntaxKind.XmlNameToken, xmlName.Text, xmlName.GetLeadingTrivia(), xmlName.GetTrailingTrivia());
 }
        /*  <summary>
        ''' Represents an XML document prologue option - version, encoding, standalone or
        ''' whitespace in an XML literal expression.
        ''' </summary>
        */
        internal static XmlDeclarationOptionSyntax XmlDeclarationOption(XmlNameTokenSyntax name, PunctuationSyntax equals, XmlStringSyntax value)
        {
            Debug.Assert(name != null && name.Kind == SyntaxKind.XmlNameToken);
            Debug.Assert(equals != null && equals.Kind == SyntaxKind.EqualsToken);
            Debug.Assert(value != null);
            //int hash;
            //var cached = SyntaxNodeCache.TryGetNode(SyntaxKind.XmlDeclarationOption, _factoryContext, name, equals, value, hash);
            //if (cached != null)
            //{
            //    return ((XmlDeclarationOptionSyntax)cached);
            //}

            var result = new XmlDeclarationOptionSyntax(SyntaxKind.XmlDeclarationOption, name, equals, value);
            //if (hash >= 0)
            //{
            //    SyntaxNodeCache.AddNode(result, hash);
            //}

            return result;
        }
 public static XmlNameSyntax XmlName(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
 {
     return new XmlNameSyntax(prefix, localName);
 }
 public static XmlPrefixSyntax XmlPrefix(XmlNameTokenSyntax localName, PunctuationSyntax colon)
 {
     return new XmlPrefixSyntax(localName, colon);
 }
Example #22
0
 public static XmlNameSyntax XmlName(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
 {
     return((XmlNameSyntax) new XmlNameSyntax.Green(prefix?.GreenNode, localName?.GreenNode).CreateRed());
 }
 internal static XmlProcessingInstructionSyntax XmlProcessingInstruction(
     PunctuationSyntax beginProcessingInstruction,
     XmlNameTokenSyntax name,
     SyntaxList<SyntaxNode> toList,
     PunctuationSyntax endProcessingInstruction)
 {
     return new XmlProcessingInstructionSyntax(beginProcessingInstruction, name, toList, endProcessingInstruction);
 }
Example #24
0
 public static XmlPrefixSyntax XmlPrefix(XmlNameTokenSyntax localName, PunctuationSyntax colon)
 {
     return((XmlPrefixSyntax) new XmlPrefixSyntax.Green(localName?.GreenNode, colon?.GreenNode).CreateRed());
 }
Example #25
0
 public XmlNameSyntax WithLocalName(XmlNameTokenSyntax localName)
 {
     return(Update(PrefixNode, localName));
 }
Example #26
0
 public XmlPrefixSyntax WithName(XmlNameTokenSyntax name)
 {
     return(Update(name, ColonToken));
 }
Example #27
0
 public static XmlPrefixSyntax XmlPrefix(XmlNameTokenSyntax localName, PunctuationSyntax colon)
 {
     return(new XmlPrefixSyntax(localName, colon));
 }
Example #28
0
 public static XmlNameSyntax XmlName(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName)
 {
     return(new XmlNameSyntax(prefix, localName));
 }