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
            });
        }
コード例 #2
0
 public InMemoryTransaction CreateTransaction(InMemoryDataBase db)
 {
     return(new InMemoryTransaction(db));
 }
コード例 #3
0
 public DataCollection(InMemoryDataBase db, int lastId = 0)
 {
     _db     = db;
     _lastId = lastId;
 }
コード例 #4
0
 public InMemoryTransaction(InMemoryDataBase db)
 {
     _db = db;
     Monitor.Enter(_db, ref _lockWasTaken);
 }