58 references to XsltConvert
System.Data.SqlXml (58)
System\Xml\Xsl\IlGen\GenerateHelper.cs (20)
356public static readonly MethodInfo DblToDec = GetMethod(typeof(XsltConvert), "ToDecimal", typeof(double)); 357public static readonly MethodInfo DblToInt = GetMethod(typeof(XsltConvert), "ToInt", typeof(double)); 358public static readonly MethodInfo DblToLng = GetMethod(typeof(XsltConvert), "ToLong", typeof(double)); 359public static readonly MethodInfo DblToStr = GetMethod(typeof(XsltConvert), "ToString", typeof(double)); 360public static readonly MethodInfo DecToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(decimal)); 361public static readonly MethodInfo DTToStr = GetMethod(typeof(XsltConvert), "ToString", typeof(DateTime)); 362public static readonly MethodInfo IntToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(int)); 363public static readonly MethodInfo LngToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(long)); 364public static readonly MethodInfo StrToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(string)); 365public static readonly MethodInfo StrToDT = GetMethod(typeof(XsltConvert), "ToDateTime", typeof(string)); 367public static readonly MethodInfo ItemToBool = GetMethod(typeof(XsltConvert), "ToBoolean", typeof(XPathItem)); 368public static readonly MethodInfo ItemToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(XPathItem)); 369public static readonly MethodInfo ItemToStr = GetMethod(typeof(XsltConvert), "ToString", typeof(XPathItem)); 370public static readonly MethodInfo ItemToNode = GetMethod(typeof(XsltConvert), "ToNode", typeof(XPathItem)); 371public static readonly MethodInfo ItemToNodes = GetMethod(typeof(XsltConvert), "ToNodeSet", typeof(XPathItem)); 373public static readonly MethodInfo ItemsToBool = GetMethod(typeof(XsltConvert), "ToBoolean", typeof(IList<XPathItem>)); 374public static readonly MethodInfo ItemsToDbl = GetMethod(typeof(XsltConvert), "ToDouble", typeof(IList<XPathItem>)); 375public static readonly MethodInfo ItemsToNode = GetMethod(typeof(XsltConvert), "ToNode", typeof(IList<XPathItem>)); 376public static readonly MethodInfo ItemsToNodes = GetMethod(typeof(XsltConvert), "ToNodeSet", typeof(IList<XPathItem>)); 377public static readonly MethodInfo ItemsToStr = GetMethod(typeof(XsltConvert), "ToString", typeof(IList<XPathItem>));
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (2)
4124value = XsltConvert.ConvertToType(value, typTarget); 4133return this.f.LiteralDecimal((decimal) value.ValueAs(XsltConvert.DecimalType));
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (1)
306return XsltConvert.InferXsltType(clrType);
System\Xml\Xsl\Runtime\XmlQueryContext.cs (6)
262case XmlTypeCode.Boolean: objActualArgs[i] = XsltConvert.ToBoolean(args[i]); break; 263case XmlTypeCode.Double: objActualArgs[i] = XsltConvert.ToDouble(args[i]); break; 264case XmlTypeCode.String: objActualArgs[i] = XsltConvert.ToString(args[i]); break; 267objActualArgs[i] = XsltConvert.ToNode(args[i]); 269objActualArgs[i] = XsltConvert.ToNodeSet(args[i]); 289if (objRet == null && extFunc.ClrReturnType == XsltConvert.VoidType)
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (13)
468Debug.Assert(destinationType == XsltConvert.ObjectType || !destinationType.IsAssignableFrom(value.GetType()), 473if (destinationType == XsltConvert.DateTimeType) 474value = XsltConvert.ToDateTime((string) value); 478if (destinationType != XsltConvert.DoubleType) 486if (destinationType == XsltConvert.XPathNodeIteratorType) { 489else if (destinationType == XsltConvert.XPathNavigatorArrayType) { 503if (destinationType != XsltConvert.ObjectType) 556if (value.GetType() == XsltConvert.DateTimeType) 557value = XsltConvert.ToString((DateTime) value); 561if (value.GetType() != XsltConvert.DoubleType) 601switch (XsltConvert.InferXsltType(sourceType).TypeCode) { 611if (sourceType == XsltConvert.DateTimeType) 612value = new XmlQueryItemSequence(new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String), XsltConvert.ToString((DateTime) value)));
System\Xml\Xsl\Runtime\XsltFunctions.cs (3)
277if (itemType == XsltConvert.StringType) { 279} else if (itemType == XsltConvert.DoubleType) { 282Debug.Assert(itemType == XsltConvert.BooleanType, "Unexpected type of atomic value " + itemType.ToString());
System\Xml\Xsl\Runtime\XsltLibrary.cs (11)
26public static readonly MethodInfo EnsureNodeSet = GetMethod(typeof(XsltConvert), "EnsureNodeSet" , typeof(IList<XPathItem>)); 262if (itemType == XsltConvert.StringType) { 264} else if (itemType == XsltConvert.DoubleType) { 267Debug.Assert(itemType == XsltConvert.BooleanType, "Unexpected type of atomic value " + itemType.ToString()); 291return CompareNumbers(op, XsltConvert.ToDouble(left), XsltConvert.ToDouble(right)); 295return (XsltConvert.ToString(left) == XsltConvert.ToString(right)) == (op == ComparisonOperator.Eq); 298return (XsltConvert.ToBoolean(left) == XsltConvert.ToBoolean(right)) == (op == ComparisonOperator.Eq); 307return CompareNumbers(op, (nodeset.Count != 0) ? 1 : 0, XsltConvert.ToBoolean(val) ? 1 : 0);
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (2)
550if (propValue.ValueType == XsltConvert.StringType) { 553Debug.Assert(propValue.ValueType == XsltConvert.DoubleType);