rotor_
❔ Loading static data without Visual Studio
I've got a number of static files (json, csv etc) that I need to make visible to my solution.
On Visual Studio I'd add them as resources and the IDE would take care of everything for me. It doesn't look like that's an option with VSC, though.
What's the idiomatic approach that I should use when developing using Visual Studio Code?
26 replies
Implementing IEnumerable<T>
Hi all!
I'm trying to simplify a complex return type that I have to repeat in a lot of places
Result<IEnumerable<Result<TRow, Faults<TDataFault>>>, Faults<TMetadatFault>>
Although I'm pleased with how the type allows me to easily package and aggregate errors that I encounter without having to throw and catch them, the length of the type does no favours to the code's readability.
I sought to start to simplify the type a bit by contracting
IEnumerable<Result<TRow, Faults<TDataFault>>>
down to
IRowSeq<TRow, TDataFault>
Which I tried to implement using the following code
Although the code compiles, once I started to update the code I use to generate an IEnumerable
Then I hit csharp(CS1624)
- the body of (method) cannot be an iterator block because 'IRowSeq<TRow, TDataFault>' is not an iterator interface type
Perhaps I'm looking at this problem from the wrong angle. Could somebody please set me right?13 replies