-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathISystemService.cs
More file actions
56 lines (42 loc) · 2.57 KB
/
ISystemService.cs
File metadata and controls
56 lines (42 loc) · 2.57 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
namespace UiPath.Ipc.Tests;
public interface ISystemService
{
/// <summary>
/// Returns the <paramref name="value"/> after the <paramref name="waitOnServer"/> is ellapsed.
/// </summary>
/// <param name="waitOnServer">The duration to wait before completing the operation.</param>
/// <param name="ct">A <see cref="CancellationToken"/> to cancel the operation.</param>
/// <returns>A task that completes successfully with a <c>null</c> result, after the specified <paramref name="waitOnServer"/>, or is canceled when the passed <see cref="CancellationToken"/> is signaled.</returns>
Task<Guid> EchoGuidAfter(Guid value, TimeSpan waitOnServer, Message? message = null, CancellationToken ct = default);
/// <summary>
/// Returns <c>true</c> if the received <see cref="Message"/> is not <c>null</c>.
/// </summary>
/// <param name="message">An optional <see cref="Message"/>.</param>
/// <returns></returns>
Task<bool> MessageReceivedAsNotNull(Message? message = null);
/// <summary>
/// A method that does not return a result and whose algorithm will not be awaited by the remote client.
/// </summary>
/// <returns>A task that completes when the Ipc infrastructure confirms that the operation has begun but way before it has ended.</returns>
Task FireAndForget(TimeSpan wait);
/// <summary>
/// A method that does not return a result and whose algorithm will not be awaited by the remote client.
/// </summary>
/// <returns>A task that completes when the Ipc infrastructure confirms that the operation has begun but way before it has ended.</returns>
Task FireAndForgetWithCt(CancellationToken ct);
Task<string> EchoString(string value);
Task<(string ExceptionType, string ExceptionMessage, string? MarshalledExceptionType)?> CallUnregisteredCallback(Message message = null!);
Task FireAndForgetThrowSync();
Task<string?> GetThreadName();
Task<string> UploadEcho(Stream stream, CancellationToken ct = default);
Task<bool> UploadJustCountBytes(Stream stream, int serverReadByteCount, TimeSpan serverDelay, CancellationToken ct = default);
Task<Stream> Download(string s, CancellationToken ct = default);
Task<int> AddIncrement(int x, int y, Message message = null!);
Task<string> DanishNameOfDay(DayOfWeek day, CancellationToken ct);
Task<byte[]> ReverseBytes(byte[] bytes, CancellationToken ct = default);
Task<bool> ThrowWithData(string serializedkey, object? serializedValue, string notSerializedKey);
}
public interface IUnregisteredCallback
{
Task<string> SomeMethod();
}