43 if (
r.MoveToFirstAttribute())
49 while (
r.MoveToNextAttribute());
53 if (!
r.IsEmptyElement)
88 if (!
r.CanResolveEntity)
109 if (
r.MoveToFirstAttribute())
114 XName name =
_aCache.
Get((
r.Prefix.Length == 0) ?
string.Empty :
r.NamespaceURI).GetName(
r.LocalName);
117 while (
r.MoveToNextAttribute());
121 if (!
r.IsEmptyElement)
161 string localName =
r.Name;
168 string localName =
r.LocalName;
175 if (!
r.CanResolveEntity)
192 string baseURI =
r.BaseURI;
206 if (
r.MoveToFirstAttribute())
217 while (
r.MoveToNextAttribute());
221 if (!
r.IsEmptyElement)
275 if (!
r.CanResolveEntity)
290 xNode.SetBaseUri(baseURI);
305 string baseUri =
r.BaseURI;
319 if (
r.MoveToFirstAttribute())
323 XName name =
_aCache.
Get((
r.Prefix.Length == 0) ?
string.Empty :
r.NamespaceURI).GetName(
r.LocalName);
331 while (
r.MoveToNextAttribute());
335 if (!
r.IsEmptyElement)
385 string localName =
r.Name;
391 string localName =
r.LocalName;
398 if (!
r.CanResolveEntity)
443 if (
text.Length == 0)
527 foreach (
object item in enumerable)
621 while (i.parent ==
this && i !=
content);
735 foreach (
object item in enumerable)
748 if (
n.parent !=
null)
755 while (
xNode.parent !=
null)
771 if (
n.parent !=
null)
778 while (
xNode.parent !=
null)
815 else if (
s.Length > 0)
836 else if (
s.Length > 0)
856 if (
n.parent !=
null)
896 xNode.AppendText(sb);
988 num ^=
text.GetHashCode();
994 num ^=
n.GetDeepHashCode();
1004 if (!
string.IsNullOrEmpty(
value))
1029 while (i !=
null && i !=
this && i == i.parent.content)
1033 if (i ==
null || i ==
this)
1048 if (name ==
null ||
xElement.name == name)
1063 while (i !=
this && i == i.parent.content)
1074 if (e !=
null && (name ==
null || e.
name == name))
1097 while (i.parent ==
this && i !=
content);
1277 if (
n.parent !=
this)
1383 if (enumerable ==
null)
1388 foreach (
object item in enumerable)
static string Argument_XObjectValue
static string InvalidOperation_ExternalCode
static string Format(string resourceFormat, object p1)
static string Argument_ConvertToString
static string InvalidOperation_ExpectedInteractive
static string InvalidOperation_UnresolvedEntityReference
static string InvalidOperation_UnexpectedNodeType
StringBuilder Append(char value, int repeatCount)
static int CompareExchange(ref int location1, int value, int comparand)
async ValueTask< bool > ReadContentFromAsync(XContainer rootContainer, XmlReader r)
bool ReadContentFrom(XContainer rootContainer, XmlReader r)
bool ReadContentFrom(XContainer rootContainer, XmlReader r, LoadOptions o)
ContentReader(XContainer rootContainer, XmlReader r, LoadOptions o)
async ValueTask< bool > ReadContentFromAsync(XContainer rootContainer, XmlReader r, LoadOptions o)
readonly NamespaceCache _aCache
readonly NamespaceCache _eCache
XContainer _currentContainer
readonly IXmlLineInfo _lineInfo
ContentReader(XContainer rootContainer)
async Task WriteContentToAsync(XmlWriter writer, CancellationToken cancellationToken)
IEnumerable< XNode > Nodes()
void AddContentSkipNotify(object content)
void AddFirst(params object?[] content)
virtual void ValidateNode(XNode node, XNode previous)
bool ContentsEqual(XContainer e)
static object GetContentSnapshot(object content)
void ReadContentFrom(XmlReader r, LoadOptions o)
static void AddContentToList(List< object > list, object content)
void AddNodeSkipNotify(XNode n)
IEnumerable< XElement > Descendants()
void AddStringSkipNotify(string s)
IEnumerable< XNode > DescendantNodes()
async Task ReadContentFromAsync(XmlReader r, CancellationToken cancellationToken)
XElement? Element(XName name)
void ReadContentFrom(XmlReader r)
void Add(params object?[] content)
virtual void AddAttribute(XAttribute a)
void ReplaceNodes(params object?[] content)
virtual void ValidateString(string s)
void Add(object? content)
IEnumerable< XElement > Elements(XName? name)
IEnumerable< XNode > GetDescendantNodes(bool self)
IEnumerable< XElement > Elements()
async Task ReadContentFromAsync(XmlReader r, LoadOptions o, CancellationToken cancellationToken)
static string GetStringValue(object value)
IEnumerable< XElement > GetElements(XName name)
string CollectText(ref XNode n)
void AddFirst(object? content)
IEnumerable< XElement > GetDescendants(XName name, bool self)
XContainer(XContainer other)
IEnumerable< XElement > Descendants(XName? name)
void RemoveNodesSkipNotify()
void ReplaceNodes(object? content)
virtual void AddAttributeSkipNotify(XAttribute a)
void AppendNodeSkipNotify(XNode n)
void WriteContentTo(XmlWriter writer)
override void AppendText(StringBuilder sb)
void AppendAttributeSkipNotify(XAttribute a)
static IEnumerable< XElement > EmptySequence
XName GetName(string localName)
static readonly XObjectChangeEventArgs Value
static readonly XObjectChangeEventArgs Add
static readonly XObjectChangeEventArgs Remove
bool NotifyChanging(object sender, XObjectChangeEventArgs e)
void SetLineInfo(int lineNumber, int linePosition)
bool NotifyChanged(object sender, XObjectChangeEventArgs e)
void SetBaseUri(string baseUri)
static string ToString(bool value)
static XmlWriter Create(string outputFileName)
XmlDateTimeSerializationMode
XNamespace Get(string namespaceName)