public ObjectStream(ILargeObject largeObject) { if (largeObject == null) throw new ArgumentNullException("largeObject"); this.largeObject = largeObject; outTempStream = new MemoryStream(64*1024); readBuf = new byte[BufferSize]; readBufferPos = -1; }
public static SqlLongString Unicode(ILargeObject largeObject) { return(new SqlLongString(largeObject, Encoding.Unicode)); }
private void WriteToObject(ILargeObject obj, Encoding encoding, string text) { using (var stream = new ObjectStream(obj)) { using (var streamWriter = new StreamWriter(stream, encoding)) { streamWriter.Write(text); streamWriter.Flush(); } } }
public override ISqlObject CreateFromLargeObject(ILargeObject objRef) { return new SqlLongBinary(objRef); }
public virtual void SetLargeObject(string key, ILargeObject largeObject) { lobStore[key] = largeObject; }
public SqlLongBinary(ILargeObject largeObject) { this.largeObject = largeObject; }
public virtual ISqlObject CreateFromLargeObject(ILargeObject objRef) { throw new NotSupportedException(String.Format("SQL Type {0} cannot be created from a large object.", TypeCode)); }
public DirectLargeObjectChannel(ServerConnector connector, ILargeObject obj) { this.connector = connector; this.obj = obj; }
public override ISqlObject CreateFromLargeObject(ILargeObject objRef) { return new SqlLongString(objRef, Encoding); }
public override void SetLargeObject(string key, ILargeObject largeObject) { base.SetLargeObject(key, largeObject); newLobs.Add(key); }
public override ISqlObject CreateFromLargeObject(ILargeObject objRef) { return(new SqlLongBinary(objRef)); }
public override ISqlObject CreateFromLargeObject(ILargeObject objRef) { return(new SqlLongString(objRef, Encoding)); }
private void Dispose(bool disposing) { if (disposing) { connector.DisposeChannel(obj.Id); } connector = null; obj = null; }
public static SqlLongString Ascii(ILargeObject largeObject) { return(new SqlLongString(largeObject, Encoding.ASCII)); }
public SqlLongString(ILargeObject largeObject, Encoding encoding) : this(largeObject, encoding, false) { }
public static T LoadFromLargeObject <T>(this ILargeObject lg) { return(lg.Convert <T>()); }