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
I copied the simple hello world example and I am attempting to return an array of values back
public class TestStrm : BaseVM
{
// This is the property that I want to stream to client
public DataElement[] dataElements => GetBufferArray();
private DataElement[] GetBufferArray()
{
return _buffer.ToArray();
}
I can see the array being full with data but nothing arrives at the client. I do break in the browser debugger and it stops at the population of the dataElements variable but length is zero.
Does this work with arrays?
p.s. If I replace
return _buffer.ToArray();
with
return new DataElement[100] ;
I do get back the empty array.
p.p.s. I see the timer updating the page.
The text was updated successfully, but these errors were encountered:
You are correct sir. Switching the array to string allowed it to work. The bizarre thing is that I am using Newtonsoft to serialize and deserialize the data that was going into that array so I do not understand why if newtonsoft can do it in my code, the same json would fail to make it to the client. I did see that you are also using Newtonsoft for the json serialization to the client. Do you have any idea why that would be the case? Thx
I copied the simple hello world example and I am attempting to return an array of values back
public class TestStrm : BaseVM
{
// This is the property that I want to stream to client
public DataElement[] dataElements => GetBufferArray();
private DataElement[] GetBufferArray()
{
return _buffer.ToArray();
}
I can see the array being full with data but nothing arrives at the client. I do break in the browser debugger and it stops at the population of the dataElements variable but length is zero.
Does this work with arrays?
p.s. If I replace
return _buffer.ToArray();
with
return new DataElement[100] ;
I do get back the empty array.
p.p.s. I see the timer updating the page.
The text was updated successfully, but these errors were encountered: