Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public static IRecordLockedDataProvider CreateRecordLockedProvider()
        {
            IRecordLockedDataProvider result = FMPDataProviderFactory.CreateDataProvider(RecordLockedName) as IRecordLockedDataProvider;

            return(result);
        }
Esempio n. 3
0
 public void SetDataProvider(IRecordLockedDataProvider dataProvider)
 {
     this.InnerDataProvider = dataProvider;
 }