Esempio n. 1
0
        public override Task <IPackage> ReadFormDataFromStreamAsync(HashingMultipartFileStreamProvider streamProvider)
        {
            IFastZipPackage package = null;

            try
            {
                var packageStream = streamProvider.ContentStreams.Single();

                package = repository.LoadStagedPackage(packageStream);
            }
            finally
            {
                if (package == null)
                {
                    foreach (var stream in streamProvider.ContentStreams)
                    {
                        repository.DiscardStagedPackage(stream);
                    }
                }
            }

            return(Task.FromResult <IPackage>(package));
        }
Esempio n. 2
0
 internal FastZipPackageFile(IFastZipPackage fastZipPackage, string path)
 {
     this._fastZipPackage = fastZipPackage;
     Path = Normalize(path);
 }
Esempio n. 3
0
 public PackageDisposingStream(IFastZipPackage package, Stream stream) : base(stream)
 {
     this.package = package;
 }
Esempio n. 4
0
 public PackageDisposingStream(IFastZipPackage package, Stream stream) : base(stream)
 {
     this.package = package;
 }
 internal FastZipPackageFile(IFastZipPackage fastZipPackage, string path)
 {
     this.fastZipPackage = fastZipPackage;
     Path = Normalize(path);
 }