Skip to content
Snippets Groups Projects
Commit a728721c authored by Klaus Fischer's avatar Klaus Fischer
Browse files

Merged methode signature changes

parents 81d34ad3 38cec46d
No related branches found
No related tags found
1 merge request!3Feature/440 mvp net sdk part 1
...@@ -38,10 +38,14 @@ void FluentSubscriberCall() { ...@@ -38,10 +38,14 @@ void FluentSubscriberCall() {
} }
ILogger logger = new Logger<AppDomain>(new NullLoggerFactory());
client = new Client(
FitConnectEndpoints.Create(FitConnectEndpoints.EndpointType.Development),
"clientId", "clientSecret",
logger: logger);
Console.WriteLine( Console.WriteLine(
"This is a dummy client to demonstrate the usage of the FitConnect SDK for .NET"); "This is a dummy client to demonstrate the usage of the FitConnect SDK for .NET");
_logger = new Logger<AppDomain>(new NullLoggerFactory()); FluentSenderCall();
client = FluentSubscriberCall();
new Client(FitConnectEndpoints.Create(FitConnectEndpoints.EndpointType.Development),
logger: _logger);
...@@ -35,7 +35,7 @@ public static class DiContainer { ...@@ -35,7 +35,7 @@ public static class DiContainer {
builder.RegisterType<Client>(); builder.RegisterType<Client>();
builder.Register(c => new OAuthService(endpoints.TokenUrl)).As<IOAuthService>(); builder.Register(c => new OAuthService(endpoints.TokenUrl)).As<IOAuthService>();
builder.Register(c => new SubmissionService(endpoints.SubmissionUrl)) builder.Register(c => new SubmissionService(endpoints.SubmissionUrl[0]))
.As<ISubmissionService>(); .As<ISubmissionService>();
builder.Register(c => new RouteService(endpoints.RoutingUrl)).As<IRouteService>(); builder.Register(c => new RouteService(endpoints.RoutingUrl)).As<IRouteService>();
...@@ -43,7 +43,7 @@ public static class DiContainer { ...@@ -43,7 +43,7 @@ public static class DiContainer {
endpoints, endpoints,
senderCertificate!, senderCertificate!,
new OAuthService(endpoints.TokenUrl), new OAuthService(endpoints.TokenUrl),
new SubmissionService(endpoints.SubmissionUrl), new SubmissionService(endpoints.SubmissionUrl[0]),
new RouteService(endpoints.RoutingUrl), new RouteService(endpoints.RoutingUrl),
logger)).As<Sender>(); logger)).As<Sender>();
...@@ -51,7 +51,7 @@ public static class DiContainer { ...@@ -51,7 +51,7 @@ public static class DiContainer {
endpoints, endpoints,
senderCertificate!, senderCertificate!,
new OAuthService(endpoints.TokenUrl), new OAuthService(endpoints.TokenUrl),
new SubmissionService(endpoints.SubmissionUrl), new SubmissionService(endpoints.SubmissionUrl[0]),
new RouteService(endpoints.RoutingUrl), new RouteService(endpoints.RoutingUrl),
logger)).As<Subscriber>(); logger)).As<Subscriber>();
......
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Net.Http.Json; using System.Net.Http.Json;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks;
using FitConnect.Models; using FitConnect.Models;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace FitConnect; namespace FitConnect;
public abstract class FunctionalBaseClass { public abstract class FunctionalBaseClass {
protected readonly ILogger? logger; protected readonly ILogger? logger;
private RSA _rsa; private RSA _rsa;
......
...@@ -9,19 +9,19 @@ public class FitConnectEndpoints { ...@@ -9,19 +9,19 @@ public class FitConnectEndpoints {
private static readonly FitConnectEndpoints DevEndpoints = new( private static readonly FitConnectEndpoints DevEndpoints = new(
"https://auth-testing.fit-connect.fitko.dev/token", "https://auth-testing.fit-connect.fitko.dev/token",
"https://submission-api-testing.fit-connect.fitko.dev", new []{"https://submission-api-testing.fit-connect.fitko.dev"},
"https://routing-api-testing.fit-connect.fitko.dev" "https://routing-api-testing.fit-connect.fitko.dev"
); );
private static readonly FitConnectEndpoints TestEndpoints = new( private static readonly FitConnectEndpoints TestEndpoints = new(
"https://auth-testing.fit-connect.fitko.dev/token", "https://auth-testing.fit-connect.fitko.dev/token",
"https://submission-api-testing.fit-connect.fitko.dev", new []{"https://submission-api-testing.fit-connect.fitko.dev"},
"https://routing-api-testing.fit-connect.fitko.dev" "https://routing-api-testing.fit-connect.fitko.dev"
); );
private static readonly FitConnectEndpoints ProductionEndpoints = new( private static readonly FitConnectEndpoints ProductionEndpoints = new(
"https://auth-testing.fit-connect.fitko.dev/token", "https://auth-testing.fit-connect.fitko.dev/token",
"https://submission-api-testing.fit-connect.fitko.dev", new []{"https://submission-api-testing.fit-connect.fitko.dev"},
"https://routing-api-testing.fit-connect.fitko.dev" "https://routing-api-testing.fit-connect.fitko.dev"
); );
...@@ -31,7 +31,7 @@ public class FitConnectEndpoints { ...@@ -31,7 +31,7 @@ public class FitConnectEndpoints {
/// <param name="tokenUrl">URL for receiving the OAuth token</param> /// <param name="tokenUrl">URL for receiving the OAuth token</param>
/// <param name="submissionUrl">URL for the submission API</param> /// <param name="submissionUrl">URL for the submission API</param>
/// <param name="routingUrl">URL for the routing API</param> /// <param name="routingUrl">URL for the routing API</param>
public FitConnectEndpoints(string tokenUrl, string submissionUrl, string routingUrl) { public FitConnectEndpoints(string tokenUrl, string[] submissionUrl, string routingUrl) {
TokenUrl = tokenUrl; TokenUrl = tokenUrl;
SubmissionUrl = submissionUrl; SubmissionUrl = submissionUrl;
RoutingUrl = routingUrl; RoutingUrl = routingUrl;
...@@ -45,7 +45,7 @@ public class FitConnectEndpoints { ...@@ -45,7 +45,7 @@ public class FitConnectEndpoints {
/// <summary> /// <summary>
/// URL for the submission API. /// URL for the submission API.
/// </summary> /// </summary>
public string SubmissionUrl { get; } public string[] SubmissionUrl { get; }
/// <summary> /// <summary>
/// URL for the routing API. /// URL for the routing API.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment