-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for fiskaltrust.ifPOS
- Loading branch information
1 parent
b94723f
commit ea8bbd6
Showing
60 changed files
with
3,889 additions
and
164 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1,3 @@ | ||
# middleware-interface-dotnet | ||
# fiskaltrust.interface project | ||
in this project the public interface used by fiskaltrust.Middleware is defined | ||
|
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,104 @@ | ||
resources: | ||
- repo: self | ||
|
||
trigger: | ||
batch: true | ||
|
||
pr: none | ||
|
||
variables: | ||
- group: 'Code Signing Certificates' | ||
- name: BuildConfiguration | ||
value: release | ||
- name: BuildPlatform | ||
value: any cpu | ||
- name: Solution | ||
value: 'fiskaltrust.if.sln' | ||
- name: TestFrameworks | ||
value: net40 | ||
|
||
jobs: | ||
- job: Build | ||
pool: | ||
vmImage: windows-latest | ||
steps: | ||
- task: VisualStudioTestPlatformInstaller@1 | ||
displayName: VsTest Platform Installer | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Restore | ||
inputs: | ||
command: restore | ||
projects: '**/*.csproj' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Build | ||
inputs: | ||
projects: '**/*.csproj' | ||
arguments: '--configuration $(BuildConfiguration)' | ||
|
||
- task: codesigning@2 | ||
displayName: 'Code Signing ' | ||
inputs: | ||
secureFileId: 'codesigning.pfx' | ||
signCertPassword: '$(Code_Signing_Password)' | ||
filePaths: | | ||
**/*.dll | ||
**/*.exe | ||
# dotnet test does not call all tests with each target framework when using a multi-target project. Should be fixed a second time in https://github.com/Microsoft/vstest/issues/1603 | ||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet40.xml -f net40 | ||
displayName: 'dotnet Test ifPOS net40' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet461.xml -f net461 | ||
displayName: 'dotnet Test ifPOS net461' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNetCoreApp30.xml -f netcoreapp3.0 | ||
displayName: 'dotnet Test ifPOS netcoreapp30' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResults.xml | ||
displayName: 'dotnet Test ifPOS FileLock' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.FileLock.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet40.xml -f net40 | ||
displayName: 'dotnet Test ifPOS TwoDCode net40' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.TwoDCode.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet461.xml -f net461 | ||
displayName: 'dotnet Test ifPOS TwoDCode net461' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.TwoDCode.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet40.xml -f net40 | ||
displayName: 'dotnet Test ifPOS Utilities net40' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.Utilities.Tests' | ||
|
||
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResultsNet461.xml -f net461 | ||
displayName: 'dotnet Test ifPOS Utilities net461' | ||
workingDirectory: 'test\fiskaltrust.ifPOS.Utilities.Tests' | ||
|
||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results' | ||
inputs: | ||
testResultsFormat: NUnit | ||
testResultsFiles: '**/*TestResults*.xml' | ||
mergeTestResults: true | ||
failTaskOnFailedTests: true | ||
buildConfiguration: $(buildConfiguration) | ||
|
||
- script: dotnet pack --no-build --output $(Build.ArtifactStagingDirectory) --configuration $(buildConfiguration) --version-suffix "$(prerelease)" /p:Build=$(Build.BuildId) /p:GitCommit=$(ShortGitCommit) | ||
displayName: 'dotnet pack ifPOS' | ||
|
||
- task: CopyFiles@1 | ||
displayName: 'Copy Files to: $(build.artifactstagingdirectory)' | ||
inputs: | ||
SourceFolder: '$(build.sourcesdirectory)' | ||
Contents: '**\bin\$(BuildConfiguration)\**\*' | ||
TargetFolder: '$(build.artifactstagingdirectory)' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: drop' | ||
inputs: | ||
PathtoPublish: '$(build.artifactstagingdirectory)' |
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,44 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.29521.150 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{396D771A-5085-49F4-B020-389C901C75D3}" | ||
ProjectSection(SolutionItems) = preProject | ||
README.md = README.md | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{18766606-E68D-44CC-B89A-5807F901D943}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4A4977D1-0B9A-44F9-B4A3-3D08FBB58D14}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "fiskaltrust.ifPOS", "src\fiskaltrust.ifPOS\fiskaltrust.ifPOS.csproj", "{ED0862F3-D1A0-4246-A22D-937F471647CE}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "fiskaltrust.ifPOS.Tests", "test\fiskaltrust.ifPOS.Tests\fiskaltrust.ifPOS.Tests.csproj", "{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{ED0862F3-D1A0-4246-A22D-937F471647CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{ED0862F3-D1A0-4246-A22D-937F471647CE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{ED0862F3-D1A0-4246-A22D-937F471647CE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{ED0862F3-D1A0-4246-A22D-937F471647CE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{ED0862F3-D1A0-4246-A22D-937F471647CE} = {18766606-E68D-44CC-B89A-5807F901D943} | ||
{B4ECE1C6-E1F3-4F54-98B8-B588D9DB52D9} = {4A4977D1-0B9A-44F9-B4A3-3D08FBB58D14} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {3CAE7E81-C6A5-44FA-8E98-F9207561129F} | ||
EndGlobalSection | ||
EndGlobal |
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,68 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<PackageId>fiskaltrust.interface</PackageId> | ||
<Version>0.0.0.0</Version> | ||
<AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
<FileVersion>0.0.0.0</FileVersion> | ||
<Authors>fiskaltrust</Authors> | ||
<Company>fiskaltrust</Company> | ||
<PackageLicenseUrl>https://www.fiskaltrust.at/license/interface</PackageLicenseUrl> | ||
<PackageProjectUrl>https://portal.fiskaltrust.at/</PackageProjectUrl> | ||
<PackageIconUrl>https://portal.fiskaltrust.at/Content/favicons/favicon-64x64.png</PackageIconUrl> | ||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
<Description>fiskaltrust.interface describes the interface that is used to communicate with the fiskaltrust.Middleware</Description> | ||
<PackageReleaseNotes> | ||
20161024: Added async-interface definition. | ||
20160528: Extended interface definition for journal. | ||
20160525: Splitted Utilities into seperated package. | ||
20160514: Added support for .net35 and pcl, documentation update. | ||
20160512: ReceiptRequest und ReceiptResponse erweitert, Dokumentation aktualisiert. | ||
20160418: Zusätzlicher Schnittstellendefinition mit der die verwendeten Signaturerstellungseinheiten veröffentlicht werden. | ||
20160214: Zusätzliches Feld cbPreviousReceiptID im ReceiptRequest um auf einen relevanten Vorbeleg verweisen zu können. | ||
20151030: Definitin der Schnittstelle | ||
</PackageReleaseNotes> | ||
<Copyright>Copyright 2016</Copyright> | ||
<PackageTags>fiskaltrust interface</PackageTags> | ||
<TargetFrameworks>net40;net461;netstandard2.0;netstandard2.1</TargetFrameworks> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<AssemblyCompany>fiskaltrust consulting gmbh</AssemblyCompany> | ||
<AssemblyProduct>fiskaltrust.if</AssemblyProduct> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'"> | ||
<DefineConstants>WCF</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'"> | ||
<DefineConstants>WCF;STREAMING</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<DefineConstants>STREAMING</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1'"> | ||
<DefineConstants>STREAMING</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net40' OR '$(TargetFramework)' == 'net461'"> | ||
<Reference Include="System.Runtime.Serialization" /> | ||
<Reference Include="System.ServiceModel" /> | ||
<Reference Include="System.ServiceModel.Web" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net461'"> | ||
<PackageReference Include="System.Interactive.Async" Version="4.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'"> | ||
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,112 @@ | ||
using System; | ||
using System.ServiceModel; | ||
#if WCF | ||
using System.ServiceModel.Web; | ||
#endif | ||
|
||
namespace fiskaltrust.ifPOS.v0 | ||
{ | ||
/// <summary> | ||
/// Interface to fiskaltrust.Middlewares | ||
/// </summary> | ||
[ServiceContract] | ||
public interface IPOS | ||
{ | ||
/// <summary> | ||
/// Decide the receipt-case and sign the receipt | ||
/// </summary> | ||
/// <param name="data">requestdata representing a receipt</param> | ||
/// <returns>responsedata to be added on receipt</returns> | ||
[OperationContract] | ||
#if WCF | ||
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/sign")] | ||
#endif | ||
[Obsolete("This method is obsolete, use v1.SignAsync instead.")] | ||
ReceiptResponse Sign(ReceiptRequest data); | ||
|
||
/// <summary> | ||
/// Decide the receipt-case and sign the receipt async begin pattern | ||
/// </summary> | ||
/// <param name="data"></param> | ||
/// <param name="callback"></param> | ||
/// <param name="state"></param> | ||
/// <returns></returns> | ||
[OperationContract(AsyncPattern = true)] | ||
[Obsolete("This method is obsolete, use v1.SignAsync instead.")] | ||
IAsyncResult BeginSign(ReceiptRequest data, AsyncCallback callback, object state); | ||
|
||
/// <summary> | ||
/// Decide the receipt-case and sign the receipt async end pattern | ||
/// </summary> | ||
/// <param name="result"></param> | ||
/// <returns></returns> | ||
[Obsolete("This method is obsolete, use v1.SignAsync instead.")] | ||
ReceiptResponse EndSign(IAsyncResult result); | ||
|
||
/// <summary> | ||
/// Stream down a journal | ||
/// </summary> | ||
/// <param name="ftJournalType">Type of the requested journal.</param> | ||
/// <param name="from">Timestamp in utc, starting to stream the journal.</param> | ||
/// <param name="to">Timestamp in utc, stopping to stream the journal.</param> | ||
/// <returns>Journalstream</returns> | ||
[OperationContract] | ||
#if WCF | ||
[WebInvoke(UriTemplate = "v0/journal?type={ftJournalType}&from={from}&to={to}")] | ||
#endif | ||
[Obsolete("This method is obsolete, use v1.JournalAsync instead.")] | ||
System.IO.Stream Journal(long ftJournalType, long from, long to); | ||
|
||
/// <summary> | ||
/// Stream down a journal async begin pattern | ||
/// </summary> | ||
/// <param name="ftJournalType"></param> | ||
/// <param name="from"></param> | ||
/// <param name="to"></param> | ||
/// <param name="callback"></param> | ||
/// <param name="state"></param> | ||
/// <returns></returns> | ||
[OperationContract(AsyncPattern = true)] | ||
[Obsolete("This method is obsolete, use v1.JournalAsync instead.")] | ||
IAsyncResult BeginJournal(long ftJournalType, long from, long to, AsyncCallback callback, object state); | ||
|
||
/// <summary> | ||
/// stream down a journal async end pattern | ||
/// </summary> | ||
/// <param name="result"></param> | ||
/// <returns></returns> | ||
[Obsolete("This method is obsolete, use v1.JournalAsync instead.")] | ||
System.IO.Stream EndJournal(IAsyncResult result); | ||
|
||
/// <summary> | ||
/// Function to test communication | ||
/// </summary> | ||
/// <param name="message">The test message</param> | ||
/// <returns>The test message</returns> | ||
[OperationContract] | ||
#if WCF | ||
[WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "v0/echo")] | ||
#endif | ||
[Obsolete("This method is obsolete, use v1.EchoAsync instead.")] | ||
string Echo(string message); | ||
|
||
/// <summary> | ||
/// Function to test communication async begin pattern | ||
/// </summary> | ||
/// <param name="message"></param> | ||
/// <param name="callback"></param> | ||
/// <param name="state"></param> | ||
/// <returns></returns> | ||
[OperationContract(AsyncPattern = true)] | ||
[Obsolete("This method is obsolete, use v1.EchoAsync instead.")] | ||
IAsyncResult BeginEcho(string message, AsyncCallback callback, object state); | ||
|
||
/// <summary> | ||
/// Function to test communication async end pattern | ||
/// </summary> | ||
/// <param name="result"></param> | ||
/// <returns></returns> | ||
[Obsolete("This method is obsolete, use v1.EchoAsync instead.")] | ||
string EndEcho(IAsyncResult result); | ||
} | ||
} |
Oops, something went wrong.