Skip to content

Commit 2ef4428

Browse files
authored
Merge pull request #2 from hkutluay/feature/core-upgrade
Feature/core upgrade
2 parents e27d5c6 + 2c06c28 commit 2ef4428

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
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

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ PM> Install-Package ZipContent.S3
1212
```
1313

1414
Sample 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
1634
string bucket = "test";
1735
string key = "foo.zip";

ZipContent.S3.Test/GivenValidZipFile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

ZipContent.S3.Test/ZipContent.S3.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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>

ZipContent.S3/ZipContent.S3.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

77
Lists 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>

0 commit comments

Comments
 (0)