private BinaryDataValue CreateBinaryDataValue(InMemoryDataBase db, BinaryPropertyDoc binaryDoc, FileDoc fileDoc = null) { if (fileDoc == null) { fileDoc = db.Files.FirstOrDefault(x => x.FileId == binaryDoc.FileId); } return(new BinaryDataValue { Id = binaryDoc.BinaryPropertyId, FileId = binaryDoc.FileId, Checksum = null, FileName = fileDoc == null ? null : new BinaryFileName(fileDoc.FileNameWithoutExtension, fileDoc.Extension), ContentType = fileDoc?.ContentType, Size = fileDoc?.Size ?? 0L, BlobProviderName = fileDoc?.BlobProvider, BlobProviderData = fileDoc?.BlobProviderData, Timestamp = fileDoc?.Timestamp ?? 0L }); }
public InMemoryTransaction(InMemoryDataBase db) { _db = db; Monitor.Enter(_db, ref _lockWasTaken); }
public DataCollection(InMemoryDataBase db, int lastId = 0) { _db = db; _lastId = lastId; }