Ole (ping please)
Deserializing binary data
I just trying to explain the data layout. Its a custom format that there is no real documentation or name for.
I have made a parser which basically reads ffield by field, but I am wondering if there is a "smarter" way of doing this.
I have a lot of binary structures to serialize and deserialize so I am looking for improvments 🙂
16 replies
❔ Getting all instances from a IServiceScope
But that has the potential to be very inefficient?
For a given scope there might be 500 potential classes, but depending on the incomming request, the path taken might only instanciate 5.
Doing it that way will force the instanciation of all.
29 replies
❔ Getting all instances from a IServiceScope
That was my frist thought, but then I need to store the event subscriber class so I can call it from dispose.
I never need it outside of dispose and the construtor so it would be kind of neat to have a void Unregister(EventHub hub) function in a interface
29 replies
❔ Sorting a list of objects into a tree structure
The actual visualization is not important, I was mostly interested in finding out if there was a somewhat built in way in c# to turn a flat structure into a tree.
I do this a fair bit for different data structures and it would be nice to learn a 'trick' if there is one.
I threw this together:
I am not really interested in feedback on this as the code will just be thrown out again, but if there is a clever linq way to do something like this let me know 🙂
With the temp data class TreeBusItem and the FindParent its about 100 lines which is a lot of wasted time for something like this.
8 replies