private static async Task SaveObjectForCrashRollbackAsync(object obj, SqoTypeInfo ti, TransactionsStorage storage, TransactionObjectHeader header, StorageEngine engine) { ObjectInfo objInfo = MetaExtractor.GetObjectInfo(obj, ti, engine.metaCache); byte[] bytes = await engine.GetObjectBytesAsync(objInfo.Oid, ti).ConfigureAwait(false); int batchSize = await storage.SaveTransactionalObjectAsync(bytes, header.Position).ConfigureAwait(false); await storage.FlushAsync().ConfigureAwait(false); header.BatchSize = batchSize; header.TypeName = ti.TypeName; }