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