public static XdmValue ToXdmValue(this Byte value, SaxonItemFactory itemFactory) { return(ToXdmValue(value, itemFactory)); }
public static XdmValue ToXdmValue(this Single value, SaxonItemFactory itemFactory) { return(ToXdmValue(value)); }
public SaxonProcessor() { processor = new Processor(); _ItemFactory = new SaxonItemFactory(processor); RegisterExtensionFunctions(processor, _ItemFactory); }
public static XdmValue ToXdmValue(this Boolean value, SaxonItemFactory itemFactory) { return(ToXdmValue(value)); }
public static XdmAtomicValue ToXdmAtomicValue(this XPathItem value, SaxonItemFactory itemFactory) { return ToXdmAtomicValue(value, itemFactory.processor); }
public static XdmNode ToXdmNode(this IXPathNavigable value, SaxonItemFactory itemFactory) { if (value == null) throw new ArgumentNullException("value"); return ToXdmNode(value.CreateNavigator(), itemFactory); }
public static XdmItem ToXdmItem(this object value, SaxonItemFactory itemFactory) { if (value == null) throw new ArgumentNullException("value"); var xdmItem = value as XdmItem; if (xdmItem != null) { return xdmItem; } var item = value as XPathItem; if (item != null) { return ToXdmItem(item, itemFactory); } var nav = value as IXPathNavigable; if (nav != null) { return ToXdmNode(nav, itemFactory); } Type type = value.GetType(); TypeCode typeCode = Type.GetTypeCode(type); switch (typeCode) { case TypeCode.Boolean: case TypeCode.Int16: case TypeCode.Int32: case TypeCode.Int64: case TypeCode.Byte: case TypeCode.SByte: case TypeCode.UInt16: case TypeCode.UInt32: case TypeCode.UInt64: case TypeCode.Char: case TypeCode.String: case TypeCode.DateTime: case TypeCode.Decimal: case TypeCode.Double: case TypeCode.Single: return ToXdmAtomicValue(value, type, typeCode, itemFactory.processor); case TypeCode.DBNull: case TypeCode.Empty: throw new ArgumentException("value cannot be null or empty.", "value"); default: case TypeCode.Object: break; } if (typeof(Uri).IsAssignableFrom(type)) { return ToXdmAtomicValue((Uri)value); } if (typeof(XmlQualifiedName).IsAssignableFrom(type)) { return ToXdmAtomicValue((XmlQualifiedName)value); } if (typeof(QName).IsAssignableFrom(type)) { return ToXdmAtomicValue((QName)value); } return ToXdmNode(value, itemFactory); }
public static XdmItem ToXdmItem(this IXPathNavigable value, SaxonItemFactory itemFactory) { return ToXdmNode(value, itemFactory); }
public static XdmValue ToXdmValue(this XPathItem value, SaxonItemFactory itemFactory) { return (value != null) ? (XdmValue)ToXdmItem(value, itemFactory) : XdmEmptySequence.INSTANCE; }
public static XdmValue ToXdmValue(this IEnumerable<string> value, SaxonItemFactory itemFactory) { return ToXdmValue(value); }
public static XdmValue ToXdmValue(this XmlQualifiedName value, SaxonItemFactory itemFactory) { return ToXdmValue(value); }
public static XdmValue ToXdmValue(this QName value, SaxonItemFactory itemFactory) { return ToXdmValue(value); }
public static XdmValue ToXdmValue(this Decimal value, SaxonItemFactory itemFactory) { return ToXdmValue(value); }