I’m writing a component that would be used in WinForms or WPF applications also could be used in Windows services or Unit tests. Is there a way to use SynchronizationContext component in non UI apps?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Any (host) application can make its own
SynchronizationContextclass and callSynchronizationContext.SetSynchronizationContext.Alternatively, you could make a no-op
SynchronizationContextin your library, then use it wheneverSynchronizationContext.Currentisnull.The question talks about writing a custom SynchronizationContext.