Skip to content

Commit

Permalink
change target framework to netstandard2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alireza Eiji committed Aug 7, 2024
1 parent f20e25c commit 84a8dd1
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class CreateBranchCommandMapper
{
internal static CreateBranchCommand ToCreateBranchCommand(this CreateBranchCommandDto createBranchCommandDto)
{
ArgumentNullException.ThrowIfNull(createBranchCommandDto);
if (createBranchCommandDto is null)
{
throw new ArgumentNullException(nameof(createBranchCommandDto));
}

return new CreateBranchCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class CreateBranchRequestMapper
{
internal static CreateBranchRequest ToCreateBranchRequest(this CreateBranchCommand createBranchCommand)
{
ArgumentNullException.ThrowIfNull(createBranchCommand);
if (createBranchCommand is null)
{
throw new ArgumentNullException(nameof(createBranchCommand));
}

return new CreateBranchRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class GetBranchListCommandMapper
{
internal static GetBranchListCommand ToGetBranchListCommand(this GetBranchListCommandDto getBranchListCommandDto)
{
ArgumentNullException.ThrowIfNull(getBranchListCommandDto);
if (getBranchListCommandDto is null)
{
throw new ArgumentNullException(nameof(getBranchListCommandDto));
}

return new GetBranchListCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class LoadBranchCommitsQueryMapper
{
public static LoadBranchCommitsQuery Map(this LoadBranchCommitsQueryDto loadBranchCommitsQueryDto)
{
ArgumentNullException.ThrowIfNull(loadBranchCommitsQueryDto);
if (loadBranchCommitsQueryDto is null)
{
throw new ArgumentNullException(nameof(loadBranchCommitsQueryDto));
}

return new LoadBranchCommitsQuery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class CreateFileCommandMapper
{
internal static CreateFileCommand Map(this CreateFileCommandDto createFileCommandDto)
{
ArgumentNullException.ThrowIfNull(createFileCommandDto);
if (createFileCommandDto is null)
{
throw new ArgumentNullException(nameof(createFileCommandDto));
}

return new CreateFileCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class CreateFileRequestMapper
{
internal static CreateFileRequest Map(this CreateFileCommand createFileCommand, string encodedContent)
{
ArgumentNullException.ThrowIfNull(createFileCommand);
if (createFileCommand is null)
{
throw new ArgumentNullException(nameof(createFileCommand));
}

return new CreateFileRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class GetFileCommandMapper
{
internal static GetFileMetadataQuery ToGetFileCommand(this GetFileMetadataQueryDto getFileMetadataQueryDto)
{
ArgumentNullException.ThrowIfNull(getFileMetadataQueryDto);
if (getFileMetadataQueryDto is null)
{
throw new ArgumentNullException(nameof(getFileMetadataQueryDto));
}

return new GetFileMetadataQuery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class GetFileRequestMapper
{
internal static GetFileRequest ToGetFileRequest(this GetFileMetadataQuery getFileMetadataQuery)
{
ArgumentNullException.ThrowIfNull(getFileMetadataQuery);
if (getFileMetadataQuery is null)
{
throw new ArgumentNullException(nameof(getFileMetadataQuery));
}

return new GetFileRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ internal static class GetFilesMetadataQueryMapper
{
public static GetFilesMetadataQuery Map(GetFilesMetadataQueryDto getFilesMetadataQueryDto)
{
ArgumentNullException.ThrowIfNull(getFilesMetadataQueryDto);

if (getFilesMetadataQueryDto is null)
{
throw new ArgumentNullException(nameof(getFilesMetadataQueryDto));
}

return new GetFilesMetadataQuery
{
RepositoryName = getFilesMetadataQueryDto.RepositoryName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ internal static class CreatePullRequestCommandMapper
{
internal static CreatePullRequestCommand ToCreatePullRequestCommand(this CreatePullRequestCommandDto createPullRequestCommandDto)
{
ArgumentNullException.ThrowIfNull(createPullRequestCommandDto);
if (createPullRequestCommandDto is null)
{
throw new ArgumentNullException(nameof(createPullRequestCommandDto));
}


return new CreatePullRequestCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ internal static class CreatePullRequestRequestMapper
{
internal static CreatePullRequestRequest ToCreatePullRequestRequest(this CreatePullRequestCommand createPullRequestCommand)
{
ArgumentNullException.ThrowIfNull(createPullRequestCommand);
if (createPullRequestCommand is null)
{
throw new ArgumentNullException(nameof(createPullRequestCommand));
}


return new CreatePullRequestRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class GetPullRequestListCommandMapper
{
internal static GetPullRequestListCommand Map(this GetPullRequestListCommandDto getPullRequestListCommandDto)
{
ArgumentNullException.ThrowIfNull(getPullRequestListCommandDto);
if (getPullRequestListCommandDto is null)
{
throw new ArgumentNullException(nameof(getPullRequestListCommandDto));
}

return new GetPullRequestListCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ internal static class GetPullRequestListRequestMapper
{
internal static GetPullRequestListRequest Map(this GetPullRequestListCommand getPullRequestListCommand)
{
ArgumentNullException.ThrowIfNull(getPullRequestListCommand);
if (getPullRequestListCommand is null)
{
throw new ArgumentNullException(nameof(getPullRequestListCommand));
}

return new GetPullRequestListRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ internal static class MergePullRequestCommandMapper
{
internal static MergePullRequestCommand Map(this MergePullRequestCommandDto mergePullRequestCommandDto)
{
ArgumentNullException.ThrowIfNull(mergePullRequestCommandDto);

if (mergePullRequestCommandDto is null)
{
throw new ArgumentNullException(nameof(mergePullRequestCommandDto));
}

return new MergePullRequestCommand
{
RepositoryName = mergePullRequestCommandDto.RepositoryName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ internal static class MergePullRequestRequestMapper
{
internal static MergePullRequestRequest Map(this MergePullRequestCommand mergePullRequestCommand)
{
ArgumentNullException.ThrowIfNull(mergePullRequestCommand);
if (mergePullRequestCommand is null)
{
throw new ArgumentNullException(nameof(mergePullRequestCommand));
}

return new MergePullRequestRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ internal static class CreateRepositoryCommandMapper
{
public static CreateRepositoryCommand Map(this CreateRepositoryCommandDto createRepositoryCommandDto)
{
ArgumentNullException.ThrowIfNull(createRepositoryCommandDto);
if (createRepositoryCommandDto is null)
{
throw new ArgumentNullException(nameof(createRepositoryCommandDto));
}


return new CreateRepositoryCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ internal static class CreateRepositoryRequestMapper
{
public static CreateRepositoryRequest Map(CreateRepositoryCommand createRepositoryCommand)
{
ArgumentNullException.ThrowIfNull(createRepositoryCommand);
if (createRepositoryCommand is null)
{
throw new ArgumentNullException(nameof(createRepositoryCommand));
}


return new CreateRepositoryRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ internal static class DeleteRepositoryCommandMapper
{
public static DeleteRepositoryCommand Map(this DeleteRepositoryCommandDto deleteRepositoryCommandDto)
{
ArgumentNullException.ThrowIfNull(deleteRepositoryCommandDto);

if (deleteRepositoryCommandDto is null)
{
throw new ArgumentNullException(nameof(deleteRepositoryCommandDto));
}

return new DeleteRepositoryCommand
{
RepositoryName = deleteRepositoryCommandDto.RepositoryName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ internal static class SearchRepositoryQueryMapper
{
public static SearchRepositoryQuery Map(this SearchRepositoryQueryDto searchRepositoryQueryDto)
{
ArgumentNullException.ThrowIfNull(searchRepositoryQueryDto);
if (searchRepositoryQueryDto is null)
{
throw new ArgumentNullException(nameof(searchRepositoryQueryDto));
}

return new SearchRepositoryQuery
{
Expand Down
6 changes: 5 additions & 1 deletion Mohaymen.GiteaClient/Mohaymen.GiteaClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>NU1507</NoWarn>
Expand All @@ -18,6 +18,10 @@
<PackageReference Include="MediatR"/>
<PackageReference Include="FluentValidation"/>
<PackageReference Include="FluentValidation.DependencyInjectionExtensions"/>
<PackageReference Include="PolySharp" Version="1.13.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>

0 comments on commit 84a8dd1

Please sign in to comment.