private void EndWriteCallback(IAsyncResult asyncResult) { State state = (State)asyncResult.AsyncState; state.FileStream.EndWrite(asyncResult); }