Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using FitConnect;
using FitConnect.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
Client client;
void FluentSenderCall() {
client.Sender
.WithDestination("destinationId")
.WithAttachments(Array.Empty<Attachment>())
.WithData("")
.Submit();
client.Sender
.WithDestination("destinationId")
.WithAttachments(Array.Empty<Attachment>())
.Submit();
}
void FluentSubscriberCall() {
var submissions = client.Subscriber
.GetAvailableSubmissions();
client.Subscriber.RequestSubmission("submissionId")
.GetAttachments((attachments => {
// Check if the attachments are valid
return true;
}));
}
ILogger _logger = new Logger<AppDomain>(new NullLoggerFactory());
client = new Client(
FitConnectEndpoints.Create(FitConnectEndpoints.EndpointType.Development), _logger);
Console.WriteLine(
"This is a dummy client to demonstrate the usage of the FitConnect SDK for .NET");
client =
new Client(FitConnectEndpoints.Create(FitConnectEndpoints.EndpointType.Development),
logger: _logger);