109 references to IsSingleton
System.Private.Xml (109)
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (6)
603
if (!typ.
IsSingleton
)
609
if (!typ.
IsSingleton
)
685
if (!typ.
IsSingleton
)
706
if (!typ.
IsSingleton
)
715
Debug.Assert(!typ.
IsSingleton
);
751
Debug.Assert(!typ.
IsSingleton
);
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (15)
367
if (((((local0).XmlType)!.
IsSingleton
) && (!(IsGlobalVariable(local0)))) && (this[XmlILOptimization.NormalizeSingletonLet]))
406
if (((local2).XmlType)!.
IsSingleton
)
764
if ((((local1).XmlType)!.
IsSingleton
) && (!OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects)))
1617
if ((((local2).XmlType)!.
IsSingleton
) && (this[XmlILOptimization.EliminateStrConcatSingle]))
1766
if (((local3).XmlType)!.
IsSingleton
)
1771
if (((local4).XmlType)!.
IsSingleton
)
1921
if (((local3).XmlType)!.
IsSingleton
)
1926
if (((local4).XmlType)!.
IsSingleton
)
1943
if (((local3).XmlType)!.
IsSingleton
)
1999
if (((local9).XmlType)!.
IsSingleton
)
2025
if ((((local4).XmlType)!.
IsSingleton
) && (!((local5).XmlType)!.MaybeMany))
2053
if ((!((local4).XmlType)!.MaybeMany) && (((local5).XmlType)!.
IsSingleton
))
2699
if (((local3).XmlType!).
IsSingleton
)
2715
if ((((local1).NodeType == QilNodeType.Let) || ((((QilNode)(local1)[0]).XmlType!).
IsSingleton
)) && (!OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects)))
3284
if (((local3).XmlType)!.
IsSingleton
)
System\Xml\Xsl\IlGen\XmlIlTypeHelper.cs (1)
28
if (qyTyp.
IsSingleton
)
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (56)
103
iterInfo.Storage = StorageDescriptor.Global(methGlobal, GetItemStorageType(iter), !iter.XmlType!.
IsSingleton
);
127
isCached = !iter.XmlType!.
IsSingleton
;
232
iterInfo.Storage = StorageDescriptor.Parameter(paramId, GetItemStorageType(iter), !iter.XmlType!.
IsSingleton
);
267
NestedVisitEnsureStack(iter.Binding, GetItemStorageType(iter), /*isCached:*/!iter.XmlType.
IsSingleton
);
281
NestedVisitEnsureStack(ndFunc.Definition, GetItemStorageType(ndFunc), !ndFunc.XmlType!.
IsSingleton
);
318
Debug.Assert(nd.XmlType!.
IsSingleton
|| CachesResult(nd) || _iterCurr.HasLabelNext,
367
if (typ.
IsSingleton
)
915
if (ndCond.XmlType!.
IsSingleton
)
947
if (!ndCond.XmlType.
IsSingleton
)
949
Debug.Assert(!ndCond.Center.XmlType!.
IsSingleton
|| !ndCond.Right.XmlType!.
IsSingleton
);
981
Debug.Assert(ndBranch.XmlType!.
IsSingleton
, "Conditional must produce a singleton");
1168
if (ndSeq.XmlType.
IsSingleton
)
1173
if (nd.XmlType!.
IsSingleton
)
1329
if (ndSet.XmlType!.
IsSingleton
)
1509
Debug.Assert(!ndStrConcat.Values.XmlType!.
IsSingleton
, "Optimizer should have folded StrConcat of a singleton value");
1525
if (!ndStr.XmlType!.
IsSingleton
)
1630
Debug.Assert(ndParsedTagName.Right.XmlType.
IsSingleton
);
1714
Debug.Assert(ndComp.Left.XmlType.
IsSingleton
&& ndComp.Right.XmlType.
IsSingleton
, "Operands to compare must be cardinality one.");
2117
if (ndIter.NodeType == QilNodeType.For || ndIter.XmlType!.
IsSingleton
)
2141
Debug.Assert(ndFor.XmlType!.
IsSingleton
);
2203
Debug.Assert(!ndLet.XmlType!.
IsSingleton
);
2209
NestedVisit(ndLet.Binding!, GetItemStorageType(ndLet), !ndLet.XmlType.
IsSingleton
);
2347
if (ndKey.XmlType!.
IsSingleton
)
2388
if (ndDod.XmlType!.
IsSingleton
)
2562
NestedVisitEnsureStack(ndActualArg, GetItemStorageType(ndFormalArg), !ndFormalArg.XmlType!.
IsSingleton
);
2575
_iterCurr.Storage = StorageDescriptor.Stack(GetItemStorageType(ndInvoke), !ndInvoke.XmlType!.
IsSingleton
);
3149
if (!ndTypeAssert.Source.XmlType!.
IsSingleton
&& ndTypeAssert.XmlType!.
IsSingleton
&& !_iterCurr.HasLabelNext)
3184
if (typDerived.
IsSingleton
&& (object)typBase == (object)TypeFactory.Node)
3211
NestedVisitEnsureStack(ndIsType.Source, typeof(XPathItem), !typDerived.
IsSingleton
);
3213
_helper.Call(typDerived.
IsSingleton
? XmlILMethods.ItemMatchesCode : XmlILMethods.SeqMatchesCode);
3221
NestedVisitEnsureStack(ndIsType.Source, typeof(XPathItem), !typDerived.
IsSingleton
);
3223
_helper.Call(typDerived.
IsSingleton
? XmlILMethods.ItemMatchesType : XmlILMethods.SeqMatchesType);
3241
if (!typBase.IsNode || !typBase.
IsSingleton
)
3245
if (!typDerived.IsNode || !typDerived.
IsSingleton
|| !typDerived.IsNotRtf)
3442
if (ndVal.Child.XmlType.
IsSingleton
)
3517
if (ndGenId.Child.XmlType!.
IsSingleton
)
3670
else if ((ndActualArg.XmlType.
IsSingleton
&& clrTypeFormalArg == itemType) || ndActualArg.XmlType.TypeCode == XmlTypeCode.None)
3675
else if (ndActualArg.XmlType.
IsSingleton
&& clrTypeFormalArg == typeof(XPathItem))
3694
NestedVisitEnsureStack(ndActualArg, GetItemStorageType(xmlTypeFormalArg), !xmlTypeFormalArg.
IsSingleton
);
3702
NestedVisitEnsureStack(ndActualArg, GetItemStorageType(xmlTypeFormalArg), !xmlTypeFormalArg.
IsSingleton
);
3734
_iterCurr.Storage = StorageDescriptor.Stack(GetItemStorageType(ndInvoke), !ndInvoke.XmlType.
IsSingleton
);
3809
NestedVisitEnsureStack(ndConv.Source, typeof(XPathItem), !typSrc.
IsSingleton
);
3810
if (!GetXsltConvertMethod(typSrc.
IsSingleton
? TypeFactory.Item : TypeFactory.ItemS, typDst, out meth))
3818
_iterCurr.Storage = StorageDescriptor.Stack(GetItemStorageType(typDst), !typDst.
IsSingleton
);
4076
if (nd.XmlType.
IsSingleton
)
4428
if (!info.PushToWriterLast || nd.XmlType!.
IsSingleton
)
4456
if (nd.XmlType!.
IsSingleton
)
4742
else if (!isCached && nd.XmlType!.
IsSingleton
)
4763
NestedVisit(nd, GetItemStorageType(nd), !nd.XmlType!.
IsSingleton
);
4825
Debug.Assert(nd.XmlType!.
IsSingleton
&& !XmlILConstructInfo.Read(nd).PushToWriterLast);
4879
if (nd.XmlType!.
IsSingleton
)
4934
return !nd.XmlType!.
IsSingleton
;
4942
if (nd.XmlType!.
IsSingleton
)
System\Xml\Xsl\QIL\QilPatternFactory.cs (2)
229
Debug.Assert(arg.XmlType!.TypeCode == XmlTypeCode.Boolean && arg.XmlType.
IsSingleton
,
446
if (values.XmlType!.
IsSingleton
)
System\Xml\Xsl\QIL\QilTypeChecker.cs (1)
1028
Check(node.XmlType!.IsNumeric && node.XmlType.
IsSingleton
&& node.XmlType.IsStrict, node, $"Node's type {node.XmlType} must be a strict singleton numeric type");
System\Xml\Xsl\Runtime\XmlQueryContext.cs (1)
292
if (xmlTypeFormalArg.
IsSingleton
)
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (1)
593
if (!xmlType.
IsSingleton
)
System\Xml\Xsl\XmlQueryType.cs (5)
487
Debug.Assert(Count == 1 &&
IsSingleton
, "This method should only be called for item types.");
488
Debug.Assert(baseType.Count == 1 && baseType.
IsSingleton
, "This method should only be called for item types.");
528
Debug.Assert(this.Count == 1 && this.
IsSingleton
, "this should be an item");
529
Debug.Assert(other.Count == 1 && other.
IsSingleton
, "other should be an item");
563
Debug.Assert(
IsSingleton
, "Do not pass a Sequence type to this method.");
System\Xml\Xsl\XmlQueryTypeFactory.cs (2)
265
Debug.Assert(itemType.
IsSingleton
, "All types should be prime.");
973
Debug.Assert(prime.
IsSingleton
, "Prime type must have cardinality one.");
System\Xml\Xsl\XPath\XPathBuilder.cs (9)
148
Debug.Assert(compType == XmlTypeCode.Boolean || left.XmlType!.
IsSingleton
&& right.XmlType!.
IsSingleton
, "Both comparison operands must be singletons");
169
Debug.Assert(val.XmlType!.
IsSingleton
);
171
if (compType == XmlTypeCode.Boolean || nodeset.XmlType!.
IsSingleton
)
198
if (right.XmlType!.
IsSingleton
)
202
if (left.XmlType!.
IsSingleton
)
614
if (arg.XmlType!.
IsSingleton
)
628
if (arg.XmlType!.
IsSingleton
)
660
if (arg.XmlType!.
IsSingleton
)
System\Xml\Xsl\XPath\XPathQilFactory.cs (4)
48
Debug.Assert(n != null && n.XmlType!.
IsSingleton
&& n.XmlType.IsNode, "Must be a singleton node");
60
Debug.Assert(n != null && n.XmlType!.
IsSingleton
&& n.XmlType.IsNode && n.XmlType.IsNotRtf, "Must be a singleton node and not an Rtf");
273
if (n.XmlType!.IsNode && n.XmlType.IsNotRtf && n.XmlType.
IsSingleton
)
330
if (id.XmlType!.
IsSingleton
)
System\Xml\Xsl\Xslt\QilGenerator.cs (1)
1352
if (selectExpr.XmlType.
IsSingleton
)
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (4)
249
case XmlTypeCode.Node: args[i] = xmlTypeFormalArg.
IsSingleton
? _f.ConvertToNode(args[i]) : _f.ConvertToNodeSet(args[i]); break;
382
if (keys.XmlType.
IsSingleton
)
539
if (baseNode.XmlType!.
IsSingleton
)
632
if (n.XmlType!.
IsSingleton
)
System\Xml\Xsl\Xslt\XsltQilFactory.cs (1)
28
Debug.Assert(xt.
IsSingleton
&& xt.IsStrict, "Xslt assumes that these types will always be singleton and strict");