Exemplo n.º 1
0
 /// <summary>
 /// Sets the handler for specified command or query.
 /// </summary>
 /// <typeparam name="THandler">The type of the handler.</typeparam>
 public void SetHandler <THandler>()
 {
     _mappings.AddOrUpdate(typeof(T), () => TypeFactory.ActivatorFactory(typeof(THandler)), (_, __) => () => TypeFactory.ActivatorFactory(typeof(THandler)));
 }
Exemplo n.º 2
0
 public void SetHandler <THandler>()
 {
     _mappings.GetOrAdd(typeof(T), () => TypeFactory.ActivatorFactory(typeof(THandler)));
 }