You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Arbiter.Mediation/IMediator.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,9 @@ namespace Arbiter.Mediation;
54
54
/// </example>
55
55
publicinterfaceIMediator
56
56
{
57
+
privateconststringDynamicSendRequiresDynamicCode="Non-generic mediator send requires runtime generic type construction. Use Send<TRequest, TResponse> when publishing with Native AOT.";
58
+
privateconststringDynamicSendRequiresUnreferencedCode="Non-generic mediator send requires runtime type inspection. Use Send<TRequest, TResponse> when publishing a trimmed application.";
59
+
57
60
/// <summary>
58
61
/// Sends a request to the appropriate handler and returns the response.
/// <returns>Awaitable task returning the handler response.</returns>
89
93
/// <exception cref="ArgumentNullException">Thrown when <paramref name="request"/> is null.</exception>
90
94
/// <exception cref="InvalidOperationException">Thrown when <paramref name="request"/> does not implement <see cref="IRequest{TResponse}"/> interface.</exception>
Copy file name to clipboardExpand all lines: src/Arbiter.Mediation/Mediator.cs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
usingSystem.Collections.Concurrent;
2
2
usingSystem.Diagnostics;
3
+
usingSystem.Diagnostics.CodeAnalysis;
3
4
usingSystem.Diagnostics.Metrics;
4
5
5
6
usingMicrosoft.Extensions.DependencyInjection;
@@ -11,6 +12,9 @@ namespace Arbiter.Mediation;
11
12
/// </summary>
12
13
publicsealedclassMediator:IMediator
13
14
{
15
+
privateconststringDynamicSendRequiresDynamicCode="Non-generic mediator send requires runtime generic type construction. Use Send<TRequest, TResponse> when publishing with Native AOT.";
16
+
privateconststringDynamicSendRequiresUnreferencedCode="Non-generic mediator send requires runtime type inspection. Use Send<TRequest, TResponse> when publishing a trimmed application.";
Copy file name to clipboardExpand all lines: src/Arbiter.Services/QueryStringEncoder.cs
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
usingSystem.Buffers.Text;
2
+
usingSystem.Diagnostics.CodeAnalysis;
2
3
usingSystem.IO.Compression;
3
4
usingSystem.Text.Json;
5
+
usingSystem.Text.Json.Serialization.Metadata;
4
6
5
7
namespaceArbiter.Services;
6
8
@@ -9,13 +11,18 @@ namespace Arbiter.Services;
9
11
/// </summary>
10
12
publicstaticclassQueryStringEncoder
11
13
{
14
+
privateconststringJsonSerializerOptionsRequiresDynamicCode="JSON serialization with JsonSerializerOptions might require runtime code generation. Use the JsonTypeInfo<T> overload for Native AOT applications.";
15
+
privateconststringJsonSerializerOptionsRequiresUnreferencedCode="JSON serialization with JsonSerializerOptions might require types that cannot be statically analyzed. Use the JsonTypeInfo<T> overload for trimmed applications.";
16
+
12
17
/// <summary>
13
18
/// Encodes a value to a query string format.
14
19
/// </summary>
15
20
/// <typeparam name="T">The type of the value</typeparam>
16
21
/// <param name="value">The value to encode</param>
17
22
/// <param name="options">The JSON options to use for serialization</param>
0 commit comments