Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Sindo committed Jan 15, 2025
1 parent 37152ed commit 6c333dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Azure.SignalR.Protocol;

public sealed class GroupMemberQueryResponsePayload : IMessagePackSerializable
public sealed class GroupMemberQueryResponse : IMessagePackSerializable
{
/// <summary>
/// The group members.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Azure.SignalR.Protocols/ServiceMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public ServiceMappingMessage(string invocationId, string connectionId, string in
/// <summary>
/// A message to list connections in a group.
/// </summary>
/// <remarks>The expected response of this message is an <see cref="AckMessage"/> whose <see cref="AckMessage.Payload"/> is a serialized <see cref="GroupMemberQueryResponsePayload"/>.</remarks>
/// <remarks>The expected response of this message is an <see cref="AckMessage"/> whose <see cref="AckMessage.Payload"/> is a serialized <see cref="GroupMemberQueryResponse"/>.</remarks>
public class GroupMemberQueryMessage : ExtensibleServiceMessage, IAckableMessage, IMessageWithTracingId
{
/// <summary>
Expand All @@ -592,7 +592,7 @@ public class GroupMemberQueryMessage : ExtensibleServiceMessage, IAckableMessage
/// <summary>
/// The max count of connections to return.
/// </summary>
public int Max { get; set; }
public int Max { get; set; } = 200;

/// <summary>
/// A token to indiate the start point of results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public void TestMessagePackSerialization()
new GroupMember { ConnectionId = "conn1", UserId = "user1" },
new GroupMember { ConnectionId = "conn2", UserId = "user2" }
};
var payload = new GroupMemberQueryResponsePayload
var payload = new GroupMemberQueryResponse
{
Members = groupMembers,
ContinuationToken = "token"
};
var buffer = new ArrayBufferWriter<byte>();
var protocol = new ServiceProtocol();
protocol.WriteMessagePayload(payload, buffer);
var deserialized = protocol.ParseMessagePayload<GroupMemberQueryResponsePayload>(new
var deserialized = protocol.ParseMessagePayload<GroupMemberQueryResponse>(new
ReadOnlySequence<byte>(buffer.WrittenMemory));
Assert.Equal(payload.ContinuationToken, deserialized.ContinuationToken);
Assert.True(payload.Members.SequenceEqual(deserialized.Members));
Expand Down

0 comments on commit 6c333dc

Please sign in to comment.