public IAsyncResult BeginWrite(AsyncCallback callback, IDataQueue queue) { return(Async.BeginCancelableInvoke((Action <IDataQueue>)DoWrite, callback, new object[] { queue })); }