Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SetState() not work #44819

Merged
merged 3 commits into from
Jul 3, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public UserEventResponse() { }
public UserEventResponse(System.BinaryData data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType) { }
public UserEventResponse(string data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType = Microsoft.Azure.Functions.Worker.WebPubSubDataType.Text) { }
[System.Text.Json.Serialization.JsonPropertyNameAttribute("states")]
public System.Collections.Generic.IReadOnlyDictionary<string, System.BinaryData> ConnectionStates { get { throw null; } set { } }
public System.Collections.Generic.IReadOnlyDictionary<string, System.BinaryData> ConnectionStates { get { throw null; } }
[System.Text.Json.Serialization.JsonPropertyNameAttribute("data")]
public System.BinaryData Data { get { throw null; } set { } }
[System.Text.Json.Serialization.JsonPropertyNameAttribute("dataType")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using Microsoft.Azure.WebPubSub.Common;

namespace Microsoft.Azure.Functions.Worker
{
Expand Down Expand Up @@ -35,6 +36,7 @@ internal override WebPubSubStatusCode StatusCode
/// The connection states.
/// </summary>
[JsonPropertyName("states")]
[JsonConverter(typeof(ConnectionStatesConverter))]
public IReadOnlyDictionary<string, BinaryData> ConnectionStates => _states;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
using Microsoft.Azure.WebPubSub.Common;

namespace Microsoft.Azure.Functions.Worker
{
Expand Down Expand Up @@ -36,7 +37,8 @@ internal override WebPubSubStatusCode StatusCode
/// The connection states.
/// </summary>
[JsonPropertyName("states")]
public IReadOnlyDictionary<string, BinaryData> ConnectionStates { get; set; }
[JsonConverter(typeof(ConnectionStatesConverter))]
public IReadOnlyDictionary<string, BinaryData> ConnectionStates => _states;

/// <summary>
/// Message.
Expand Down
Loading