17 throw new ArgumentException();
24 throw new ArgumentException();
33 var value = obj.
Value;
37 xmlNode = XmlType((ISqlBinary) value);
39 xmlNode = XmlType((ISqlString) value);
41 throw new NotSupportedException();
49 var content =
new byte[len];
52 const int bufferSize = 1024 * 10;
54 using (var stream = binary.
GetInput()) {
55 using (var reader =
new BinaryReader(stream)) {
57 var buffer =
new byte[bufferSize];
58 var readCount = reader.Read(buffer, 0, bufferSize);
60 Array.Copy(buffer, 0, content, offset, readCount);
75 var content =
new char[len];
78 const int bufferSize = 1024*10;
82 var buffer =
new char[bufferSize];
83 var readCount = reader.Read(buffer, 0, bufferSize);
88 Array.Copy(buffer, 0, content, offset, readCount);
94 var bytes = s.
Encoding.GetBytes(content);
95 if (!s.
Encoding.Equals(Encoding.UTF8))
96 bytes = Encoding.Convert(s.
Encoding, Encoding.UTF8, bytes);
102 var result = AppendChild(GetXmlNode(obj), GetXPath(xpath), GetXmlNode(value));
112 var result = Extract(GetXmlNode(obj), GetXPath(xpath));
121 var result = ExtractValue(GetXmlNode(obj), GetXPath(xpath));
139 var result = Delete(GetXmlNode(obj), GetXPath(xpath));
144 return node.
Delete(xpath);
148 return Exists(obj, GetXPath(xpath));
152 throw new NotImplementedException();
156 throw new NotImplementedException();
164 return InsertBefore(obj, GetXPath(xpath), value);
168 throw new NotImplementedException();
176 var result = Update(GetXmlNode(obj), GetXPath(xpath), value);
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
SqlXmlNode Extract(string xpath)
The system uses instances of this interface to resolve routines given a user invocation.
static DataObject InsertChild(DataObject obj, DataObject xpath, DataObject child, DataObject value)
bool IsNull
Gets a value that indicates if this object is materialized as null.
static DataObject Extract(DataObject obj, DataObject xpath)
SqlType Type
Gets the SqlType that defines the object properties
static DataObject InsertBefore(DataObject obj, DataObject xpath, DataObject value)
static SqlXmlNode InsertChild(SqlXmlNode node, string xpath, SqlXmlNode child, SqlXmlNode value)
static SqlXmlNode XmlType(ISqlString s)
static DataObject InsertBefore(DataObject obj, string xpath, DataObject value)
SqlXmlNode InsertChild(string xpath, SqlXmlNode child, SqlXmlNode value)
SqlXmlNode AppendChild(string xpath, SqlXmlNode value)
static BinaryType Binary(int maxSize)
static DataObject Update(DataObject obj, DataObject xpath, DataObject value)
ISqlObject Value
Gets the underlined value that is handled.
long Length
Gets the raw length of the binary object.
static DataObject ExtractValue(DataObject obj, DataObject xpath)
static SqlXmlNode AppendChild(SqlXmlNode node, string xpath, SqlXmlNode value)
static readonly SqlNull Value
static DataObject Exists(DataObject obj, DataObject xpath)
Defines the contract for a valid SQL Object
static string GetXPath(DataObject xpath)
static SqlXmlNode Extract(SqlXmlNode node, string xpath)
static NumericType Numeric()
static SqlXmlNode GetXmlNode(DataObject node)
static DataObject XmlType(DataObject obj)
static SqlXmlNode Delete(SqlXmlNode node, string xpath)
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
static SqlXmlNode XmlType(ISqlBinary binary)
SqlXmlNode Delete(string xpath)
static ISqlObject ExtractValue(SqlXmlNode node, string xpath)
Defines the properties of a specific SQL Type and handles the values compatible.
TextReader GetInput(Encoding encoding)
ISqlObject ExtractValue(string xpath)
static StringType String()
static DataObject Delete(DataObject obj, DataObject xpath)
Stream GetInput()
Gets an object used to read the contents of the binary
static SqlXmlNode Update(SqlXmlNode node, string xpath, DataObject value)
bool Update(string xpath, object value, string xmlNs, out byte[] updated)
Defines the required contract of a SQL BINARY object
static DataObject Exists(DataObject obj, string xpath)
static DataObject AppendChild(DataObject obj, DataObject xpath, DataObject value)