112 references to SR
System.Private.Xml.Linq (112)
System\Xml\Linq\XAttribute.cs (9)
182
if (parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
710
throw new ArgumentException(
SR
.Format(
SR
.Argument_NamespaceDeclarationPrefixed, name.LocalName));
716
if (name.LocalName != "xml") throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXml);
722
throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXmlns);
731
throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXml);
736
throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXmlns);
746
throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXml);
752
throw new ArgumentException(
SR
.Argument_NamespaceDeclarationXmlns);
System\Xml\Linq\XContainer.cs (23)
390
if ((object)s != (object)content) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
405
if (last != content || n != last.next) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
559
if (content != null) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
616
if (n.parent != null) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
823
XObject => throw new ArgumentException(
SR
.Argument_XObjectValue),
827
if (s == null) throw new ArgumentException(
SR
.Argument_ConvertToString);
833
if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
846
if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
854
if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
871
if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
944
if (!r.CanResolveEntity) throw new InvalidOperationException(
SR
.InvalidOperation_UnresolvedEntityReference);
950
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, r.NodeType));
1000
if (!r.CanResolveEntity) throw new InvalidOperationException(
SR
.InvalidOperation_UnresolvedEntityReference);
1006
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, r.NodeType));
1098
if (!r.CanResolveEntity) throw new InvalidOperationException(
SR
.InvalidOperation_UnresolvedEntityReference);
1104
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, r.NodeType));
1214
if (!r.CanResolveEntity) throw new InvalidOperationException(
SR
.InvalidOperation_UnresolvedEntityReference);
1220
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, r.NodeType));
1245
if (n.parent != this) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
System\Xml\Linq\XDocument.cs (12)
436
if (!reader.EOF) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedEndOfFile);
437
if (d.Root == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingRoot);
484
if (!reader.EOF) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedEndOfFile);
485
if (d.Root == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingRoot);
865
throw new ArgumentException(
SR
.Argument_AddAttribute);
870
throw new ArgumentException(
SR
.Argument_AddAttribute);
918
throw new ArgumentException(
SR
.Format(
SR
.Argument_AddNode, XmlNodeType.CDATA));
920
throw new ArgumentException(
SR
.Format(
SR
.Argument_AddNode, XmlNodeType.Document));
936
if (nt != allowBefore) throw new InvalidOperationException(
SR
.InvalidOperation_DocumentStructure);
948
throw new ArgumentException(
SR
.Argument_AddNonWhitespace);
System\Xml\Linq\XElement.cs (19)
811
if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType));
814
if (!reader.EOF) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedEndOfFile);
846
if (await reader.MoveToContentAsync().ConfigureAwait(false) != XmlNodeType.Element) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType));
854
if (!reader.EOF) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedEndOfFile);
941
if (lastAttr == null || a != lastAttr.next) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
1882
if (parent != null || annotations != null || content != null || lastAttr != null) throw new InvalidOperationException(
SR
.InvalidOperation_DeserializeInstance);
1883
if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType));
1901
if (Attribute(a.Name) != null) throw new InvalidOperationException(
SR
.InvalidOperation_DuplicateAttribute);
1908
if (Attribute(a.Name) != null) throw new InvalidOperationException(
SR
.InvalidOperation_DuplicateAttribute);
1916
if (a.parent != null) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
2048
if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
2085
if (a.parent != this) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
2125
if (node is XDocument) throw new ArgumentException(
SR
.Format(
SR
.Argument_AddNode, XmlNodeType.Document));
2126
if (node is XDocumentType) throw new ArgumentException(
SR
.Format(
SR
.Argument_AddNode, XmlNodeType.DocumentType));
System\Xml\Linq\XLinq.cs (4)
50
if (_parent.content != null) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
110
if (content is XAttribute) throw new ArgumentException(
SR
.Argument_AddAttribute);
157
if (n.parent != null) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
627
if (_element == null) throw new InvalidOperationException(
SR
.InvalidOperation_WriteAttribute);
System\Xml\Linq\XName.cs (2)
78
if (i <= 1 || i == expandedName.Length - 1) throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidExpandedName, expandedName));
System\Xml\Linq\XNode.cs (13)
106
if (parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
150
if (parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
241
if (p1 != p2) throw new InvalidOperationException(
SR
.InvalidOperation_MissingAncestor);
268
throw new InvalidOperationException(
SR
.InvalidOperation_MissingAncestor);
427
if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
445
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, reader.NodeType));
472
if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
506
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedNodeType, reader.NodeType));
523
if (parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
539
if (parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
545
if (p != null && p.parent != c) throw new InvalidOperationException(
SR
.InvalidOperation_ExternalCode);
System\Xml\Linq\XNodeBuilder.cs (2)
61
throw new NotSupportedException(
SR
.NotSupported_WriteBase64);
133
throw new NotSupportedException(
SR
.NotSupported_WriteEntityRef);
System\Xml\Linq\XNodeDocumentOrderComparer.cs (4)
55
if (n1 == null && x != null) throw new ArgumentException(
SR
.Format(
SR
.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(x));
57
if (n2 == null && y != null) throw new ArgumentException(
SR
.Format(
SR
.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(y));
System\Xml\Linq\XNodeEqualityComparer.cs (6)
79
if (n1 == null && x != null) throw new ArgumentException(
SR
.Format(
SR
.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(x));
81
if (n2 == null && y != null) throw new ArgumentException(
SR
.Format(
SR
.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(y));
98
if (n == null && obj != null) throw new ArgumentException(
SR
.Format(
SR
.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(obj));
System\Xml\Linq\XNodeReader.cs (1)
557
throw new InvalidOperationException(
SR
.InvalidOperation_ExpectedInteractive);
System\Xml\Linq\XProcessingInstruction.cs (2)
162
if (string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase)) throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidPIName, name));
System\Xml\Schema\XNodeValidator.cs (4)
50
if (source == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingRoot);
57
if (source.Parent == null) throw new InvalidOperationException(
SR
.InvalidOperation_MissingParent);
60
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_BadNodeType, nt));
System\Xml\XPath\XNodeNavigator.cs (11)
451
throw new NotSupportedException(
SR
.NotSupported_MoveToId);
684
if (c == null) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_BadNodeType, NodeType));
875
if (!(result is T)) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedEvaluation, result.GetType()));
885
if (!(r is T)) throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_UnexpectedEvaluation, r.GetType()));
927
if (node is XDocumentType) throw new ArgumentException(
SR
.Format(
SR
.Argument_CreateNavigator, XmlNodeType.DocumentType));
931
if (text.GetParent() is XDocument) throw new ArgumentException(
SR
.Format(
SR
.Argument_CreateNavigator, XmlNodeType.Whitespace));