IsNotNull
How does one typically handle complex program flow?
In a larger commerce system I worked on in the past, we had sales orders that when processed had hundreds of conditions and state changes. We eventually had a whole namespace filled with classes that would process various aspects of the order and validate business logic.
If we tried to build a system like that using only a single state machine, it would have become difficult or impossible to maintain after the first couple months of development.
45 replies
How does one typically handle complex program flow?
For example, within the .NET base classes, it would be typical for a key provider, a file provider, a script runner, and a remote connection to all be modeled as separate classes that would each maintain their own state and logic related to operations.
45 replies
More Elegant Way to Make a Generic Lookup Type
That would be a good idea, and is similar to how I plan to consume these types in my own projects.
The types though, are in an open source library and I want the library to remain neutral about configuration and dependency choices of the consumer. I won't pressume they are using a specific (or any) DI container.
15 replies
More Elegant Way to Make a Generic Lookup Type
The lookup type implements a non allocating StartsWith search, and right now to get around the issues of this help post I'm using LINQ to cast the IEnumerable (which boxes the struct enumerator, killing the performance benefit of making the enumerator non-allocating).
15 replies
More Elegant Way to Make a Generic Lookup Type
@boiled goose
I'll probably just change
storageThing.Get<T>(key)
to
storageThing.Lookup<T>().Get(key)
Doesn't avoid the need for a type lookup (that TypedDictionary would be perfect), but I can avoid the casting and if the consumer holds onto a specific lookup reference, then they can avoid the type lookup for all future calls.15 replies