-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from difi/netstandard2.0
Netstandard2.0 & felles avhengigheter
- Loading branch information
Showing
58 changed files
with
1,154 additions
and
1,492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.101 | ||
- name: Print openssl version | ||
run: | | ||
openssl version | ||
- name: Decrypt signing key to use for strong-name | ||
env: | ||
SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }} | ||
run: | | ||
openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
|
||
test: | ||
name: test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.101 | ||
- name: Print openssl version | ||
run: | | ||
openssl version | ||
- name: Decrypt signing key to use for strong-name | ||
env: | ||
SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }} | ||
run: | | ||
openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: echo Info | ||
run: echo "Tests with certificates are skiped due to Unix LocalMachine X509Store is limited to the Root and CertificateAuthority stores." | ||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal --filter Category!=testWithCert | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.101 | ||
- name: Print openssl version | ||
run: | | ||
openssl version | ||
- name: Decrypt signing key to use for strong-name | ||
env: | ||
SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }} | ||
run: | | ||
openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
- name: Set release version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | ||
- name: Set assembly version to major semver | ||
run: echo "ASSEMBLY_VERSION=$(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0" >> $GITHUB_ENV | ||
- name: Print assembly version | ||
run: echo $ASSEMBLY_VERSION | ||
- name: Pack nupkg | ||
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digdir/packed Difi.Oppslagstjeneste.Klient | ||
- name: Pack nupkg | ||
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digdir/packed Difi.Oppslagstjeneste.Klient.Domene | ||
- name: Pack nupkg | ||
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digdir/packed Difi.Oppslagstjeneste.Klient.Scripts | ||
- name: Push Klient to NuGet | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }} | ||
run: dotnet nuget push "digdir/packed/difi-oppslagstjeneste-klient.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY | ||
- name: Push Domene to NuGet | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }} | ||
run: dotnet nuget push "digdir/packed/Difi.Oppslagstjeneste.Klient.Domene.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY | ||
- name: Push Scripts to NuGet | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }} | ||
run: dotnet nuget push "digdir/packed/Difi.Oppslagstjeneste.Klient.Scripts.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
161 changes: 60 additions & 101 deletions
161
Difi.Oppslagstjeneste.Klient.Domene/Difi.Oppslagstjeneste.Klient.Domene.csproj
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{3EC8D196-7BD8-4C88-B989-216801AD0840}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Difi.Oppslagstjeneste.Klient.Domene</RootNamespace> | ||
<AssemblyName>Difi.Oppslagstjeneste.Klient.Domene</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile> | ||
</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile>bin\Release\Difi.Oppslagstjeneste.Klient.Domene.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignAssembly>true</SignAssembly> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyOriginatorKeyFile>C:\Keys\signingkey.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="ApiClientShared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6e6972f540d5419a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\api-client-shared.2.0.0\lib\net45\ApiClientShared.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Difi.Felles.Utility, Version=1.2.0.0, Culture=neutral, PublicKeyToken=6e6972f540d5419a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\difi-felles-utility-dotnet.1.2.0\lib\net45\Difi.Felles.Utility.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\SolutionItems\SharedAssemblyInfo.cs"> | ||
<Link>Properties\SharedAssemblyInfo.cs</Link> | ||
</Compile> | ||
<Compile Include="Entiteter\EndringsInfo.cs" /> | ||
<Compile Include="Entiteter\Enums\Informasjonsbehov.cs" /> | ||
<Compile Include="Entiteter\Enums\Status.cs" /> | ||
<Compile Include="Entiteter\Enums\Varslingsstatus.cs" /> | ||
<Compile Include="Entiteter\Epostadresse.cs" /> | ||
<Compile Include="Entiteter\Svar\EndringerSvar.cs" /> | ||
<Compile Include="Entiteter\Svar\PersonerSvar.cs" /> | ||
<Compile Include="Entiteter\Svar\PrintSertifikatSvar.cs" /> | ||
<Compile Include="Exceptions\OppslagstjenesteException.cs" /> | ||
<Compile Include="Exceptions\SikkerhetsException.cs" /> | ||
<Compile Include="Exceptions\SendException.cs" /> | ||
<Compile Include="Exceptions\SertifikatException.cs" /> | ||
<Compile Include="Exceptions\UventetFeilException.cs" /> | ||
<Compile Include="Exceptions\ValideringsException.cs" /> | ||
<Compile Include="Exceptions\XmlParseException.cs" /> | ||
<Compile Include="Entiteter\Kontaktinformasjon.cs" /> | ||
<Compile Include="Entiteter\Mobiltelefonnummer.cs" /> | ||
<Compile Include="Entiteter\Person.cs" /> | ||
<Compile Include="Extensions\EnumExtensions.cs" /> | ||
<Compile Include="Navnerom.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Entiteter\Sikkerdigitalpostadresse.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="..\difi-oppslagstjeneste.pfx"> | ||
<Link>Properties\difi-oppslagstjeneste.pfx</Link> | ||
</None> | ||
<None Include="App.config" /> | ||
<None Include="C:\Keys\signingkey.snk"> | ||
<Link>signingkey.snk</Link> | ||
</None> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Build"> | ||
|
||
<PropertyGroup> | ||
<Title>Difi Oppslagstjeneste Klient Domene</Title> | ||
<PackageId>Difi.Oppslagstjeneste.Klient.Domene</PackageId> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>..\signingkey.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RootNamespace>Difi.Oppslagstjeneste.Klient.Domene</RootNamespace> | ||
<ProjectGuid>{3EC8D196-7BD8-4C88-B989-216801AD0840}</ProjectGuid> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Difi.Felles.Utility.Resources" Version="5.0.1"/> | ||
<PackageReference Include="Digipost.Api.Client.Shared" Version="7.0.1"/> | ||
<PackageReference Include="Difi.Felles.Utility" Version="5.0.1"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<AssemblyName>Difi.Oppslagstjeneste.Klient.Domene</AssemblyName> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<TargetFrameworkProfile/> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile> | ||
</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile>bin\Release\Difi.Oppslagstjeneste.Klient.Domene.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="..\SolutionItems\SharedAssemblyInfo.cs"> | ||
<Link>Properties\SharedAssemblyInfo.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup/> | ||
</Project> |
43 changes: 21 additions & 22 deletions
43
Difi.Oppslagstjeneste.Klient.Domene/Entiteter/Svar/PrintSertifikatSvar.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
using System.Security.Cryptography.X509Certificates; | ||
|
||
namespace Difi.Oppslagstjeneste.Klient.Domene.Entiteter.Svar | ||
{ | ||
/// <summary> | ||
/// Svar fra Oppslagstjeneste som inneholder sertifikat til printleverandør og adressen til leverandøren | ||
/// av postkassetjenesten. | ||
/// </summary> | ||
public class PrintSertifikatSvar | ||
{ | ||
/// <summary> | ||
/// <summary> | ||
/// Et X509 Sertifikat. | ||
/// </summary> | ||
public X509Certificate2 Printsertifikat { get; set; } | ||
|
||
/// <summary> | ||
/// Adresse til en leverandør av Postkassetjeneste | ||
/// </summary> | ||
public string PostkasseleverandørAdresse { get; set; } | ||
} | ||
} | ||
using System.Security.Cryptography.X509Certificates; | ||
|
||
namespace Difi.Oppslagstjeneste.Klient.Domene.Entiteter.Svar | ||
{ | ||
/// <summary> | ||
/// Svar fra Oppslagstjeneste som inneholder sertifikat til printleverandør og adressen til leverandøren | ||
/// av postkassetjenesten. | ||
/// </summary> | ||
public class PrintSertifikatSvar | ||
{ | ||
/// <summary> | ||
/// Et X509 Sertifikat. | ||
/// </summary> | ||
public X509Certificate2 Printsertifikat { get; set; } | ||
|
||
/// <summary> | ||
/// Adresse til en leverandør av Postkassetjeneste | ||
/// </summary> | ||
public string PostkasseleverandørAdresse { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.