Pannekoekje
Target multiple architectures at once
Hey guys, I have an app I want to publish for linux-x64 and linux-arm64.
I'm using the "RunTimeIdentifier" option in the .csproj file, I tried
linux-x64;linux-arm64
but this didn't work. Can't really find an answer online, is this not possible?17 replies
Backgroundworker IsBusy not reporting correct status?
I have this code :
https://dotnetfiddle.net/pmiBoz
Which does not run in dotnetfiddle somehow, but it writes "False" to console whenever the worker.IsBusy is encountered. Am I doing something wrong?
34 replies
Async await in minimal API
Hey guys, I have a minimal API app which also hosts a client which has a websocket connection.
The websocket gets in a disconnect state a lot so I reconnect if I can't get the data I want.
However, it seems like the await for the reconnect isn't properly awaited, is there some special async/await mechanics in these minimal API routed calls?
Code:
I've tried with both .Wait and await for the reconnect call.
51 replies
✅ How to deal with different JSON types
I have an API endpoint and depending on the query it can return a list of objects or an object as such:
Query for multiple
Query for single
For now I'm only allowing queries for multiple but would like to support both.
Is there a way to support this?
11 replies
Serialize value of property only
Given this code:
https://dotnetfiddle.net/C3Pt3C
How would I only serialize the value of the "TempType" rather than the whole object?
15 replies
Variable scoping
Considering this code:
Trying to compile, within the "ShowOrders" function, the
client.AddCallback<TestObject>(ShowOrders);
line gives the error :
Use of unassigned local variable 'test'
Why does it not complain about testString
?24 replies
JSON deserialization (proper way?)
Hi,
I'm writing a client that consumes some JSON from a websocket.
The socket can give multiple types of messages over it, what would be the most efficient (fastest) way to deserialize the JSON objects to classes? All the type of messages are known beforehand.
The way I'm doing it now is:
16 replies
Casting, reflection or?
I'm trying to write a simple lib for consuming a few JSON API endpoints and processing their contents with callbacks.
I'm trying to cast the "parsed" variable to its actual class (as it is known during runtime). Psuedo code as follows:
Is this just impossible or am I implenting this stuff wrong?
73 replies