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.Trim('.'), fileDoc.Extension.Trim('.')), ContentType = fileDoc?.ContentType, Size = fileDoc?.Size ?? 0L, BlobProviderName = fileDoc?.BlobProvider, BlobProviderData = fileDoc?.BlobProviderData, Timestamp = fileDoc?.Timestamp ?? 0L }); }
public InMemoryTransaction CreateTransaction(InMemoryDataBase db) { return(new InMemoryTransaction(db)); }
public DataCollection(InMemoryDataBase db, int lastId = 0) { _db = db; _lastId = lastId; }
public InMemoryTransaction(InMemoryDataBase db) { _db = db; Monitor.Enter(_db, ref _lockWasTaken); }