protected ReadFileResultItemData ReadFileItem(ReadFileItemData itemParam, Guid userID, DbTransaction trans) { ReadFileResultItemData item = new ReadFileResultItemData(); IRecordLockedDataProvider dataProvider = RecordLockedDataProvider; if (dataProvider != null) { RecordLockedManager.ServiceProxy.SetDataProvider(dataProvider); } if (itemParam.LockID != Guid.Empty) { RecordLockedManager.UpdateLockInfo(itemParam.LockID, DateTime.UtcNow.Add(RecordLocked.DefaultExpireTimeSpan)); } string extendsionName = string.Empty; if (!string.IsNullOrEmpty(itemParam.ClientFileName)) { extendsionName = Path.GetExtension(itemParam.ClientFileName); } item.ReadData = FileStorageManager.ReadFile(this.DataProvider, itemParam.PhysicalFileID, extendsionName, itemParam.Position, itemParam.ReadCount); return(item); }
public static IRecordLockedDataProvider CreateRecordLockedProvider() { IRecordLockedDataProvider result = FMPDataProviderFactory.CreateDataProvider(RecordLockedName) as IRecordLockedDataProvider; return(result); }
public void SetDataProvider(IRecordLockedDataProvider dataProvider) { this.InnerDataProvider = dataProvider; }