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)); }
/* <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()); }
public static XmlProcessingInstructionSyntax XmlProcessingInstruction( PunctuationSyntax beginProcessingInstruction, XmlNameTokenSyntax name, SyntaxList <SyntaxNode> toList, PunctuationSyntax endProcessingInstruction) { return(XmlProcessingInstruction(beginProcessingInstruction, name, toList.Node, endProcessingInstruction)); }
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()); }
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 Update(XmlNameTokenSyntax name, PunctuationSyntax colonToken) { if (name != this.Name || colonToken != this.ColonToken) { var newNode = SyntaxFactory.XmlPrefix(name, colonToken); return(newNode); } return(this); }
public XmlNameSyntax Update(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName) { if (prefix != this.PrefixNode || localName != this.LocalNameNode) { var newNode = SyntaxFactory.XmlName(prefix, localName); return(newNode); } return(this); }
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; }
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); }
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); }
/* <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); }
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); }
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); }
public static XmlPrefixSyntax XmlPrefix(XmlNameTokenSyntax localName, PunctuationSyntax colon) { return((XmlPrefixSyntax) new XmlPrefixSyntax.Green(localName?.GreenNode, colon?.GreenNode).CreateRed()); }
public XmlNameSyntax WithLocalName(XmlNameTokenSyntax localName) { return(Update(PrefixNode, localName)); }
public XmlPrefixSyntax WithName(XmlNameTokenSyntax name) { return(Update(name, ColonToken)); }
public static XmlPrefixSyntax XmlPrefix(XmlNameTokenSyntax localName, PunctuationSyntax colon) { return(new XmlPrefixSyntax(localName, colon)); }
public static XmlNameSyntax XmlName(XmlPrefixSyntax prefix, XmlNameTokenSyntax localName) { return(new XmlNameSyntax(prefix, localName)); }