File tree Expand file tree Collapse file tree 6 files changed +32
-14
lines changed
Expand file tree Collapse file tree 6 files changed +32
-14
lines changed Original file line number Diff line number Diff line change 1010 - name : Setup .NET Core
1111 uses : actions/setup-dotnet@v1
1212 with :
13- dotnet-version : 3.1.100
13+ dotnet-version : 5.0.x
1414 - name : Build with dotnet
1515 run : dotnet build --configuration Release
1616 - name : Unit Tests
Original file line number Diff line number Diff line change 1212 - name : Setup .NET Core
1313 uses : actions/setup-dotnet@v1
1414 with :
15- dotnet-version : 3.1.101
15+ dotnet-version : 5.0.x
1616 - name : Build with dotnet
1717 run : dotnet build --configuration Release
1818 - name : Test with dotnet
Original file line number Diff line number Diff line change @@ -12,6 +12,24 @@ PM> Install-Package ZipContent.S3
1212```
1313
1414Sample usage:
15+
16+ ``` csharp
17+ string bucket = " test" ;
18+ string key = " foo.zip" ;
19+
20+ IAmazonS3 s3 = new AmazonS3Client ();
21+
22+ IPartialFileReader partialReader = new S3PartialFileReader (s3 , bucket , key );
23+
24+ IZipContentLister lister = new ZipContentLister (partialReader );
25+
26+ var contentList = await lister .GetContents ();
27+
28+ foreach (var content in contentList )
29+ Console .WriteLine (item .FullName );
30+ ```
31+
32+ Before 1.2.0 version:
1533``` csharp
1634string bucket = " test" ;
1735string key = " foo.zip" ;
Original file line number Diff line number Diff line change @@ -7,19 +7,19 @@ namespace ZipContent.S3.Test
77 [ TestClass ]
88 public class GivenValidZipFile
99 {
10- private readonly IZipContentLister _lister ;
11-
10+
1211 public GivenValidZipFile ( )
1312 {
14- _lister = new ZipContentLister ( ) ;
13+
1514 }
1615
1716 [ TestMethod ]
1817 public async Task ExtractedFileCountShouldMatch ( )
1918 {
2019
2120 var partialReader = new S3PartialFileReader ( TestContext . GetAmazonS3Client ( ) , "ZipFiles" , "foo.zip" ) ;
22- var content = await _lister . GetContents ( partialReader ) ;
21+ var lister = new ZipContentLister ( partialReader ) ;
22+ var content = await lister . GetContents ( ) ;
2323 Assert . AreEqual ( content . Count , 1 ) ;
2424 }
2525
@@ -28,8 +28,8 @@ public async Task ShouldHaveExpectedFileName()
2828 {
2929
3030 var partialReader = new S3PartialFileReader ( TestContext . GetAmazonS3Client ( ) , "ZipFiles" , "foo.zip" ) ;
31- var content = await _lister . GetContents ( partialReader ) ;
32-
31+ var lister = new ZipContentLister ( partialReader ) ;
32+ var content = await lister . GetContents ( ) ;
3333 Assert . AreEqual ( content [ 0 ] . FullName , "foo.txt" ) ;
3434 }
3535 }
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1 </TargetFramework >
4+ <TargetFramework >net5.0 </TargetFramework >
55
66 <IsPackable >false</IsPackable >
77 </PropertyGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >netstandard1.6;netstandard2.1;netstandard2.0;</TargetFrameworks >
4+ <TargetFrameworks >netstandard1.6;netstandard2.1;netstandard2.0;net5.0 </TargetFrameworks >
55 <Description >S3PartialFileReader for ZipContent.Core
66
77Lists zip file content on AWS S3 without downloading whole document. Supports both zip and zip64 files.</Description >
@@ -10,14 +10,14 @@ Lists zip file content on AWS S3 without downloading whole document. Supports bo
1010 <RepositoryUrl >https://github.com/hkutluay/ZipContent</RepositoryUrl >
1111 <PackageTags >zip list content AWS S3</PackageTags >
1212 <PackageIcon >s3_logo.png</PackageIcon >
13- <Version >1.1 .0</Version >
14- <AssemblyVersion >1.1 .0.0</AssemblyVersion >
15- <FileVersion >1.1 .0.0</FileVersion >
13+ <Version >1.2 .0</Version >
14+ <AssemblyVersion >1.2 .0.0</AssemblyVersion >
15+ <FileVersion >1.2 .0.0</FileVersion >
1616 </PropertyGroup >
1717
1818 <ItemGroup >
1919 <PackageReference Include =" AWSSDK.S3" Version =" 3.3.110.71" />
20- <PackageReference Include =" ZipContent.Core" Version =" 1.1.1 " />
20+ <PackageReference Include =" ZipContent.Core" Version =" 1.2.0 " />
2121 </ItemGroup >
2222
2323 <ItemGroup >
You can’t perform that action at this time.
0 commit comments