KS.Fiks.IO.Send.Client
2.0.1
See the version list below for details.
dotnet add package KS.Fiks.IO.Send.Client --version 2.0.1
NuGet\Install-Package KS.Fiks.IO.Send.Client -Version 2.0.1
<PackageReference Include="KS.Fiks.IO.Send.Client" Version="2.0.1" />
paket add KS.Fiks.IO.Send.Client --version 2.0.1
#r "nuget: KS.Fiks.IO.Send.Client, 2.0.1"
// Install KS.Fiks.IO.Send.Client as a Cake Addin #addin nuget:?package=KS.Fiks.IO.Send.Client&version=2.0.1 // Install KS.Fiks.IO.Send.Client as a Cake Tool #tool nuget:?package=KS.Fiks.IO.Send.Client&version=2.0.1
fiks-io-send-client-dotnet
About this library
This is a .NET library compatible with .NET Standard 2.1 for sending messages to the Fiks platform. The library provides functionality to send messages to the Fiks platform using the Fiks IO Send API. The library supports sending messages with and without ASiC-E encryption.
Getting Started
To get started with KS.Fiks.IO.Send.Client, add the NuGet package to your .NET project:
dotnet add package KS.Fiks.IO.Send.Client --version <version_number>
Usage Example
Sending a Message To send a message, you need to create an instance of MeldingSpesifikasjonApiModel and provide the necessary stream or payload. Here's an example:
using KS.Fiks.IO.Send.Client;
using KS.Fiks.IO.Send.Client.Models;
using System;
using System.IO;
using System.Threading.Tasks;
public class SendMessageExample
{
public async Task Send()
{
var sender = new FiksIOSender(/* configuration and maskinportenClient */);
var metaData = new MeldingSpesifikasjonApiModel(
_fiksIoAccountId, // Guid
_toAccountId, // Guid
_messageType, // string
ttl: (long)TimeSpan.FromDays(2).TotalMilliseconds, // long
headere: new()); // Dictionary<string, string>
// Without ASiC-E
using var dataStream = new MemoryStream(/* your data */);
var sentMelding = await sender.Send(metaData, dataStream);
// With ASiC-E
var payload = new Payload("testfile.txt")
var sentMelding = await sender.SendWithEncryptedData(metaData, payload);
Console.WriteLine($"Message sent with ID: {sendtMelding.MeldingId}");
}
}
Configuration of FiksIOSender
The FiksIOSender class requires a configuration object to be passed in the constructor. The configuration object must implement the IFiksIOConfiguration interface. Here's an example of how to create a configuration object:
Step 1: Create an instance of FiksIOSenderConfigurationBuilder
var configurationBuilder = new FiksIOSenderConfigurationBuilder();
Step 2: Configure Asice Signing
You can configure Asice Signing using either a public and private key pair or an X509Certificate2 instance.
Using Public and Private Key Pair
configurationBuilder.WithAsiceSigningConfiguration(publicKeyPath, privateKeyPath);
Replace publicKeyPath and privateKeyPath with the paths to your public and private keys respectively.
Using X509Certificate2
configurationBuilder.WithAsiceSigningConfiguration(certificate);
Replace certificate with an instance of X509Certificate2.
Step 3: Configure Fiks Integrasjon
configurationBuilder.WithFiksIntegrasjonConfiguration(fiksIntegrasjonId, fiksIntegrasjonPassword);
Step 4: Configure API
configurationBuilder.WithApiConfiguration(path, scheme, host, hostPort);
Step 5: Build the Configuration
var configuration = configurationBuilder.Build();
Example
var configuration = new FiksIOSenderConfigurationBuilder()
.WithAsiceSigningConfiguration(appSettings.AsiceSigningPublicKey, appSettings.AsiceSigningPrivateKey)
.WithFiksIntegrasjonConfiguration(appSettings.FiksIoIntegrationId, appSettings.FiksIoIntegrationPassword)
.WithApiConfiguration(null, appSettings.ApiScheme, appSettings.ApiHost, appSettings.ApiPort)
.Build();
var sender = new FiksIOSender(configuration, _maskinportenClient);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- KS.Fiks.IO.Crypto (>= 1.0.4)
- KS.Fiks.Maskinporten.Client (>= 1.1.10)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- KS.Fiks.IO.Crypto (>= 1.0.4)
- KS.Fiks.Maskinporten.Client (>= 1.1.10)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KS.Fiks.IO.Send.Client:
Package | Downloads |
---|---|
KS.Fiks.IO.Client
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.2 | 325 | 10/16/2024 |
2.0.1 | 97 | 10/16/2024 |
2.0.0 | 20,043 | 7/3/2024 |
1.0.12 | 12,799 | 4/22/2024 |
1.0.11 | 12,637 | 11/10/2023 |
1.0.10 | 426 | 11/7/2023 |
1.0.9 | 28,339 | 1/23/2023 |
1.0.8 | 27,282 | 2/9/2022 |
1.0.7 | 11,408 | 5/10/2021 |
1.0.6 | 3,689 | 11/10/2020 |
1.0.5 | 1,740 | 2/12/2020 |
1.0.4 | 1,531 | 8/29/2019 |
1.0.3 | 1,401 | 6/25/2019 |
1.0.2 | 1,718 | 6/5/2019 |
1.0.1 | 1,536 | 5/7/2019 |
1.0.0 | 1,419 | 5/6/2019 |
0.0.4 | 1,107 | 5/6/2019 |