public RapidXamlElement WithUpdatedLocationStart(int newLocationStart) { var result = new RapidXamlElement { Attributes = this.Attributes, Children = this.Children, Content = this.Content, Location = new RapidXamlSpan(newLocationStart, this.Location.Length), Name = this.Name, OriginalString = this.OriginalString, }; return(result); }
public RapidXamlElement CloneWithAdjustedLocationStart(int startChange) { var result = new RapidXamlElement { Content = this.Content, Location = this.Location.CloneWithAdjustedLocationStart(startChange), Name = this.Name, OriginalString = this.OriginalString, Attributes = this.Attributes, Children = this.Children, }; for (int i = 0; i < this.Children.Count; i++) { result.Children.Add(this.Children[i].CloneWithAdjustedLocationStart(startChange)); } return(result); }