Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/StreamJsonRpc/MessagePackFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,7 @@ public void Serialize(ref MessagePackWriter writer, T? value, MessagePackSeriali
/// 3. Declare a constructor with a signature of (<see cref="SerializationInfo"/>, <see cref="StreamingContext"/>).
/// </remarks>
[RequiresDynamicCode(RuntimeReasons.CloseGenerics)]
[RequiresUnreferencedCode(RuntimeReasons.LoadType)]
private class MessagePackExceptionResolver : IFormatterResolver
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,13 @@ private interface IGeneratingEnumeratorTracker : System.IAsyncDisposable
/// </summary>
/// <param name="objectType">The type which may implement <see cref="IAsyncEnumerable{T}"/>.</param>
/// <returns>true if given <see cref="Type"/> implements <see cref="IAsyncEnumerable{T}"/>; otherwise, false.</returns>
/// <devremarks>
/// We use <see langword="int"/> as a generic type argument in this because what we use doesn't matter, but we must use *something*.
/// </devremarks>
public static bool CanSerialize(Type objectType) => TrackerHelpers.FindIAsyncEnumerableInterfaceImplementedBy(objectType) is not null;

/// <summary>
/// Checks if a given <see cref="Type"/> is exactly some closed generic type based on <see cref="IAsyncEnumerable{T}"/>.
/// </summary>
/// <param name="objectType">The type which may be <see cref="IAsyncEnumerable{T}"/>.</param>
/// <returns>true if given <see cref="Type"/> is <see cref="IAsyncEnumerable{T}"/>; otherwise, false.</returns>
/// <devremarks>
/// We use <see langword="int"/> as a generic type argument in this because what we use doesn't matter, but we must use *something*.
/// </devremarks>
public static bool CanDeserialize(Type objectType) => TrackerHelpers.IsIAsyncEnumerable(objectType);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public MessageFormatterProgressTracker(JsonRpc jsonRpc, IJsonRpcFormatterState f
/// </summary>
/// <param name="objectType">The type which may implement <see cref="IProgress{T}"/>.</param>
/// <returns>The <see cref="IProgress{T}"/> from given <see cref="Type"/> object, or <see langword="null"/> if no such interface was found in the given <paramref name="objectType" />.</returns>
public static Type? FindIProgressOfT(Type objectType)
=> TrackerHelpers.FindIProgressInterfaceImplementedBy(objectType);
public static Type? FindIProgressOfT(Type objectType) => TrackerHelpers.FindIProgressInterfaceImplementedBy(objectType);

/// <summary>
/// Checks if a given <see cref="Type"/> implements <see cref="IProgress{T}"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class RpcMarshalableOptionalInterfaceAttribute : Attribute
/// updating RPC interfaces.</param>
/// <param name="optionalInterface">The <see cref="Type"/> of the known optional interface that the marshalable
/// object may implement.</param>
public RpcMarshalableOptionalInterfaceAttribute(int optionalInterfaceCode, Type optionalInterface)
public RpcMarshalableOptionalInterfaceAttribute(int optionalInterfaceCode, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type optionalInterface)
{
this.OptionalInterfaceCode = optionalInterfaceCode;
this.OptionalInterface = optionalInterface;
Expand Down