Skip to content

Commit c8a92a2

Browse files
authored
Merge pull request #13 from FantasyTeddy/small-improvements
Small improvements
2 parents 44dcf63 + 5721edc commit c8a92a2

File tree

5 files changed

+41
-52
lines changed

5 files changed

+41
-52
lines changed

Storage/Storage.csproj

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
43
<TargetFramework>netstandard2.0</TargetFramework>
@@ -25,37 +24,25 @@
2524
<PackageIcon>icon.png</PackageIcon>
2625
<PackageReadmeFile>README.md</PackageReadmeFile>
2726
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
28-
</PropertyGroup>
29-
<PropertyGroup>
3027
<IncludeSymbols>true</IncludeSymbols>
3128
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
32-
</PropertyGroup>
33-
<PropertyGroup>
3429
<GenerateDocumentationFile>true</GenerateDocumentationFile>
35-
</PropertyGroup>
36-
<PropertyGroup>
3730
<Nullable>enable</Nullable>
3831
<LangVersion>latest</LangVersion>
3932
<WarningsAsErrors>CS8600;CS8602;CS8603</WarningsAsErrors>
4033
</PropertyGroup>
34+
4135
<PropertyGroup Condition=" '$(Version)' == '' ">
4236
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.4.0</VersionPrefix>
4337
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
4438
</PropertyGroup>
39+
4540
<ItemGroup>
4641
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
4742
<PackageReference Include="MimeMapping" Version="2.0.0" />
4843
<PackageReference Include="supabase-core" Version="0.0.3" />
4944
</ItemGroup>
50-
<ItemGroup>
51-
<None Remove="MimeMapping" />
52-
<None Remove="Responses\" />
53-
<None Remove="Exceptions\" />
54-
</ItemGroup>
55-
<ItemGroup>
56-
<Folder Include="Responses\" />
57-
<Folder Include="Exceptions\" />
58-
</ItemGroup>
45+
5946
<ItemGroup>
6047
<None Include="..\.github\icon.png" Pack="true" Link="icon.png" PackagePath="\" />
6148
<None Include="..\README.md" Pack="true" Link="README.md" PackagePath="\" />

StorageTests/StorageFileAnonTests.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class StorageFileAnonTests
1717
Client AdminStorage => Helpers.GetClient();
1818
private Client Storage => Helpers.GetPublicClient();
1919

20-
private string _bucketId;
21-
private IStorageFileApi<FileObject> _adminBucket;
22-
private IStorageFileApi<FileObject> _bucket;
20+
private string _bucketId = string.Empty;
21+
private IStorageFileApi<FileObject> _adminBucket = null!;
22+
private IStorageFileApi<FileObject> _bucket = null!;
2323

2424
[TestInitialize]
2525
public async Task InitializeTest()
@@ -43,7 +43,10 @@ public async Task TestCleanup()
4343
Assert.IsNotNull(files);
4444

4545
foreach (var file in files)
46-
await _adminBucket.Remove(new List<string> { file.Name });
46+
{
47+
if (file.Name is not null)
48+
await _adminBucket.Remove(new List<string> { file.Name });
49+
}
4750

4851
await AdminStorage.DeleteBucket(_bucketId);
4952
}

StorageTests/StorageFileTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class StorageFileTests
1515
{
1616
Client Storage => Helpers.GetClient();
1717

18-
private string _bucketId;
19-
private IStorageFileApi<FileObject> _bucket;
18+
private string _bucketId = string.Empty;
19+
private IStorageFileApi<FileObject> _bucket = null!;
2020

2121
[TestInitialize]
2222
public async Task InitializeTest()
@@ -41,7 +41,10 @@ public async Task TestCleanup()
4141
Assert.IsNotNull(files);
4242

4343
foreach (var file in files)
44-
await _bucket.Remove(new List<string> { file.Name });
44+
{
45+
if (file.Name is not null)
46+
await _bucket.Remove(new List<string> { file.Name });
47+
}
4548

4649
await Storage.DeleteBucket(_bucketId);
4750
}

StorageTests/StorageTests.csproj

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
4+
<TargetFramework>net8.0</TargetFramework>
65
<IsPackable>false</IsPackable>
7-
<ReleaseVersion>1.0.2</ReleaseVersion>
6+
<Nullable>enable</Nullable>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
12-
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
13-
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
14-
<PackageReference Include="coverlet.collector" Version="3.2.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
15-
<PrivateAssets>all</PrivateAssets>
16-
</PackageReference>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
11+
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
12+
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
13+
<PackageReference Include="coverlet.collector" Version="6.0.0">
14+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
15+
<PrivateAssets>all</PrivateAssets>
16+
</PackageReference>
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<Folder Include="db\" />
21-
<Folder Include="Assets\" />
22-
</ItemGroup>
23-
<ItemGroup>
24-
<None Remove="Assets\" />
25-
<None Remove="postgrest-csharp" />
20+
<ProjectReference Include="..\Storage\Storage.csproj" />
2621
</ItemGroup>
22+
2723
<ItemGroup>
2824
<None Update="Assets\supabase-csharp.png">
2925
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3026
</None>
3127
</ItemGroup>
32-
<ItemGroup>
33-
<ProjectReference Include="..\Storage\Storage.csproj" />
34-
</ItemGroup>
3528
</Project>

storage-csharp.sln

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.8.34330.188
4+
MinimumVisualStudioVersion = 10.0.40219.1
45
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F94175FC-DE2B-4DBC-9C79-2A97B8489412}"
56
ProjectSection(SolutionItems) = preProject
6-
docker-compose.yml = docker-compose.yml
7-
README.md = README.md
8-
.env = .env
97
.gitignore = .gitignore
108
CHANGELOG.md = CHANGELOG.md
9+
docker-compose.yml = docker-compose.yml
10+
README.md = README.md
1111
EndProjectSection
1212
EndProject
1313
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{43FFFE0C-91D2-43AB-913F-B3824702AE49}"
1414
EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{5B805377-7615-441C-86B1-4BE203B0289B}"
1616
ProjectSection(SolutionItems) = preProject
17+
.github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
1718
.github\workflows\build-documentation.yaml = .github\workflows\build-documentation.yaml
1819
.github\workflows\release.yml = .github\workflows\release.yml
19-
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
2020
EndProjectSection
2121
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Storage", "Storage\Storage.csproj", "{4D1E857D-133C-4BF9-82C6-414416D69ACD}"
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage", "Storage\Storage.csproj", "{4D1E857D-133C-4BF9-82C6-414416D69ACD}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorageTests", "StorageTests\StorageTests.csproj", "{B23C82F8-01DF-4982-A13B-7CC27A2F7CF5}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StorageTests", "StorageTests\StorageTests.csproj", "{B23C82F8-01DF-4982-A13B-7CC27A2F7CF5}"
2525
EndProject
2626
Global
2727
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -38,11 +38,14 @@ Global
3838
{B23C82F8-01DF-4982-A13B-7CC27A2F7CF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
3939
{B23C82F8-01DF-4982-A13B-7CC27A2F7CF5}.Release|Any CPU.Build.0 = Release|Any CPU
4040
EndGlobalSection
41-
GlobalSection(MonoDevelopProperties) = preSolution
42-
version = 1.0.2
41+
GlobalSection(SolutionProperties) = preSolution
42+
HideSolutionNode = FALSE
4343
EndGlobalSection
4444
GlobalSection(NestedProjects) = preSolution
4545
{43FFFE0C-91D2-43AB-913F-B3824702AE49} = {F94175FC-DE2B-4DBC-9C79-2A97B8489412}
4646
{5B805377-7615-441C-86B1-4BE203B0289B} = {43FFFE0C-91D2-43AB-913F-B3824702AE49}
4747
EndGlobalSection
48+
GlobalSection(MonoDevelopProperties) = preSolution
49+
version = 1.0.2
50+
EndGlobalSection
4851
EndGlobal

0 commit comments

Comments
 (0)