Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class AlbatrossContext
- {
- [ThreadStatic]
- private static ISimpleMessageSender<string> _output;
- public static ISimpleMessageSender<string> Output
- {
- get
- {
- if (_output == null)
- {
- _output = SimpleMessageSender.ConsoleLogger("");
- }
- return _output;
- }
- }
- public static IDisposable SetOutput(ISimpleMessageSender<string> newOutput)
- {
- var temp = _output;
- _output = newOutput;
- return Disposable.Create(
- () =>
- {
- _output = temp;
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement