blob: aff277874596c0ed25f5191b5646ce1d37afc822 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
using System.Threading;
namespace jive
{
public interface ISynchronizationContextFactory : Factory<ISynchronizationContext> {}
public class SynchronizationContextFactory : ISynchronizationContextFactory
{
readonly DependencyRegistry registry;
public SynchronizationContextFactory(DependencyRegistry registry)
{
this.registry = registry;
}
public ISynchronizationContext create()
{
return new SynchronizedContext(registry.get_a<SynchronizationContext>());
}
}
}
|