81 instantiations of StreamItemMessage
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Server.Tests (6)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (6)
95message: new StreamItemMessage("xyz", item: 42),
99message: new StreamItemMessage("xyz", item: 42.0f),
103message: new StreamItemMessage("xyz", item: "string"),
107message: new StreamItemMessage("xyz", item: true),
421new MessageSizeTestData("StreamItemMessage_WithNullItem", new StreamItemMessage("1", null), 7),
422new MessageSizeTestData("StreamItemMessage_WithItem", new StreamItemMessage("1", 1), 7),
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Common.Tests (26)
Internal\Protocol\JsonHubProtocolTests.cs (2)
157JsonHubProtocol.WriteMessage(new StreamItemMessage("1", todo), writer);
215new JsonProtocolTestData("StreamItemMessage_HasFloatItem", new StreamItemMessage("123", 2.0f), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":2}"),
Internal\Protocol\JsonHubProtocolTestsBase.cs (12)
46new JsonProtocolTestData("StreamItemMessage_HasHeaders", AddHeaders(TestHeaders, new StreamItemMessage("123", new CustomObject())), true, false, "{\"type\":2," + SerializedHeaders + ",\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"),
47new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"),
48new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnore", new StreamItemMessage("123", new CustomObject()), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"),
49new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnoreAndNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"),
50new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueInclude", new StreamItemMessage("123", new CustomObject()), true, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"),
51new JsonProtocolTestData("StreamItemMessage_HasIntegerItem", new StreamItemMessage("123", 1), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":1}"),
52new JsonProtocolTestData("StreamItemMessage_HasStringItem", new StreamItemMessage("123", "Foo"), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":\"Foo\"}"),
53new JsonProtocolTestData("StreamItemMessage_HasBoolItem", new StreamItemMessage("123", true), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":true}"),
54new JsonProtocolTestData("StreamItemMessage_HasNullItem", new StreamItemMessage("123", null), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":null}"),
107new JsonProtocolTestData("StreamItemMessage_ItemFirst", new StreamItemMessage("1a", "foo"), false, true, "{ \"item\": \"foo\", \"invocationId\": \"1a\", \"type\":2 }")
369new MessageSizeTestData("StreamItemMessage_WithNullItem", new StreamItemMessage("1", null), 42),
370new MessageSizeTestData("StreamItemMessage_WithItem", new StreamItemMessage("1", 1), 39),
Internal\Protocol\MessagePackHubProtocolTestBase.cs (6)
95message: new StreamItemMessage("xyz", item: 42),
99message: new StreamItemMessage("xyz", item: 42.0f),
103message: new StreamItemMessage("xyz", item: "string"),
107message: new StreamItemMessage("xyz", item: true),
421new MessageSizeTestData("StreamItemMessage_WithNullItem", new StreamItemMessage("1", null), 7),
422new MessageSizeTestData("StreamItemMessage_WithItem", new StreamItemMessage("1", 1), 7),
Internal\Protocol\MessagePackHubProtocolTests.cs (5)
141message: new StreamItemMessage("xyz", item: null),
145message: new StreamItemMessage("xyz", item: TestEnum.One),
149message: new StreamItemMessage("xyz", item: new CustomObject()),
153message: new StreamItemMessage("xyz", item: new[] { new CustomObject(), new CustomObject() }),
157message: AddHeaders(TestHeaders, new StreamItemMessage("xyz", item: new[] { new CustomObject(), new CustomObject() })),
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.SignalR.Microbenchmarks (4)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.Tests (39)
HubConnectionHandlerTests.cs (26)
2026HubConnectionHandlerTestUtils.AssertHubMessage(new StreamItemMessage(string.Empty, "0"), messages[0]);
2027HubConnectionHandlerTestUtils.AssertHubMessage(new StreamItemMessage(string.Empty, "1"), messages[1]);
2028HubConnectionHandlerTestUtils.AssertHubMessage(new StreamItemMessage(string.Empty, "2"), messages[2]);
2029HubConnectionHandlerTestUtils.AssertHubMessage(new StreamItemMessage(string.Empty, "3"), messages[3]);
3606await client.SendHubMessageAsync(new StreamItemMessage("id", letter)).DefaultTimeout();
3630await client.SendHubMessageAsync(new StreamItemMessage("id", letter)).DefaultTimeout();
3654await client.SendHubMessageAsync(new StreamItemMessage("id", thing)).DefaultTimeout();
3690await client.SendHubMessageAsync(new StreamItemMessage(spot.ToString(CultureInfo.InvariantCulture), words[spot][pos[spot]])).DefaultTimeout();
3747await client.SendHubMessageAsync(new StreamItemMessage("id", thing)).DefaultTimeout();
3876await client.SendHubMessageAsync(new StreamItemMessage("id", 5)).DefaultTimeout();
3877await client.SendHubMessageAsync(new StreamItemMessage("id", 10)).DefaultTimeout();
3928await client.SendHubMessageAsync(new StreamItemMessage("channelId", "not a number")).DefaultTimeout();
3951await client.SendHubMessageAsync(new StreamItemMessage("fake_id", "not a number")).DefaultTimeout();
4064await client.SendHubMessageAsync(new StreamItemMessage("id", "hello")).DefaultTimeout();
4065await client.SendHubMessageAsync(new StreamItemMessage("id", " world")).DefaultTimeout();
4105await client.SendHubMessageAsync(new StreamItemMessage("id", "hello")).DefaultTimeout();
4106await client.SendHubMessageAsync(new StreamItemMessage("id", " world")).DefaultTimeout();
4139await client.SendHubMessageAsync(new StreamItemMessage("id", "ignored")).DefaultTimeout();
4146await client.SendHubMessageAsync(new StreamItemMessage("id", "error!")).DefaultTimeout();
4176await client.SendHubMessageAsync(new StreamItemMessage("id", "ignored")).DefaultTimeout();
4183await client.SendHubMessageAsync(new StreamItemMessage("id", "error!")).DefaultTimeout();
4426await client.SendHubMessageAsync(new StreamItemMessage(streamId, phrase));
4493HubConnectionHandlerTestUtils.AssertHubMessage(new StreamItemMessage(string.Empty, argument.Value), messages[0]);
4576await client.SendHubMessageAsync(new StreamItemMessage("id", "hello")).DefaultTimeout();
4718await client.SendHubMessageAsync(new StreamItemMessage("1", 1)).DefaultTimeout();
4719await client.SendHubMessageAsync(new StreamItemMessage("1", 14)).DefaultTimeout();
Internal\MessageBufferTests.cs (13)
56var writeTask = messageBuffer.WriteAsync(new SerializedHubMessage(new StreamItemMessage("id", null)), default);
132await messageBuffer.WriteAsync(new StreamItemMessage("id", null), default);
181await messageBuffer.WriteAsync(new StreamItemMessage("id", null), default);
251await messageBuffer.WriteAsync(new StreamItemMessage("1", null), default).DefaultTimeout();
294var writeTask = messageBuffer.WriteAsync(new SerializedHubMessage(new StreamItemMessage("id", null)), default);
329await messageBuffer.WriteAsync(new StreamItemMessage("1", null), default);
335await messageBuffer.WriteAsync(new StreamItemMessage("1", null), default);
336await messageBuffer.WriteAsync(new StreamItemMessage("1", null), default);
373Assert.True(messageBuffer.ShouldProcessMessage(new StreamItemMessage("1", null)));
374Assert.True(messageBuffer.ShouldProcessMessage(new StreamItemMessage("1", null)));
386Assert.True(messageBuffer.ShouldProcessMessage(new StreamItemMessage("1", null)));
461Assert.True(messageBuffer.ShouldProcessMessage(new StreamItemMessage("1", null)));
462Assert.True(messageBuffer.ShouldProcessMessage(new StreamItemMessage("1", null)));
49 references to StreamItemMessage
Microsoft.AspNetCore.Components.Server (2)
Microsoft.AspNetCore.Components.Server.Tests (5)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Common.Tests (10)
Microsoft.AspNetCore.SignalR.Core (5)
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (13)
Microsoft.AspNetCore.SignalR.Tests.Utils (2)