Getting your thing adopted as a Windows component and distributed by Windows Update is a common trap for Microsoft developers. If you read the documentation and follow your intuition, you will probably implement things exactly as I did.Īlso I am not trying to convince anyone that channels are the best answer! I just found them helpful in my projects and think they have not been promoted very well in the. I don't have any open code to share, but I found the design very intuitive. There are synchronous and asynchronous options for both. Reading and writing from a channel are also just method calls. I haven't used Scrutor, so I can't speak to that. This is really a single class since it can take a type parameter if that makes sense-no need for separate mocks. I just have a service implementation that consumes from a ChannelReader and discards the result. Since I am not concerned with results, mocking is even easier. It is somewhat indirect but no more indirect than an interface, really. The controller is not interested in the result of the service's operation, so there is no need for any return value.ĭependencies can be traced by the job type associated with the channel. I'm glad you asked, because I should clarify that my use case is "fire and forget" tasks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |