Example #1
0
 public FileSaver(Entity.UserIdentity userIdentity, IFileInfoProvider fileInfoProvider, bool useTempFile)
 {
     _userIdentity = userIdentity;
     _fileInfoProvider = fileInfoProvider;
     _useTempFile = useTempFile;
     if (OperationContext.Current != null && OperationContext.Current.Channel != null)
     {
         _communicationObject = OperationContext.Current.Channel;
         _communicationObject.Faulted += new EventHandler(Abort);
     }
     _beginTime = DateTime.Now;
 }
        public ServerSideFileReceive(UserIdentity userIdentity, /*IResourceEx<T> resourceEx*/IFileInfoProvider provider)
        {
            //_resourceEx = resourceEx;
            _userIdentity = userIdentity;
            //Resource = resource;
            _provider = provider;
            //_resourceFileInfo = _resource.ResourceInfo as ResourceFileInfo;
            if (OperationContext.Current != null && OperationContext.Current.Channel != null)
            {
                _communicationObject = OperationContext.Current.Channel;
                _communicationObject.Faulted += new EventHandler(Abort);
            }

        }