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