11using System ;
22using Streamliner . Core . Utilities ;
33
4- namespace Streamliner . Actions
4+ namespace Streamliner . Actions ;
5+
6+ public class BlockActionIocFactory : IBlockActionFactory
57{
6- public class BlockActionIocFactory : IBlockActionFactory
7- {
8- private readonly DependencyRegistrar _registrar ;
8+ private readonly DependencyRegistrar _registrar ;
99
10- public BlockActionIocFactory ( DependencyRegistrar registrar )
11- {
12- if ( registrar == null ) throw new ArgumentNullException ( nameof ( registrar ) ) ;
13- _registrar = registrar ;
14- }
10+ public BlockActionIocFactory ( DependencyRegistrar registrar ) =>
11+ _registrar = registrar ?? throw new ArgumentNullException ( nameof ( registrar ) ) ;
1512
16- public ProducerBlockActionBase < T > CreateProducerAction < T > ( Type type )
17- {
18- return ( ProducerBlockActionBase < T > ) _registrar . Resolve ( type ) ;
19- }
13+ public ProducerBlockActionBase < T > CreateProducerAction < T > ( Type type ) =>
14+ ( ProducerBlockActionBase < T > ) _registrar . Resolve ( type ) ;
2015
21- public TransformerBlockActionBase < TIn , TOut > CreateTransformerAction < TIn , TOut > ( Type type )
22- {
23- return ( TransformerBlockActionBase < TIn , TOut > ) _registrar . Resolve ( type ) ;
24- }
16+ public TransformerBlockActionBase < TIn , TOut > CreateTransformerAction < TIn , TOut > ( Type type ) =>
17+ ( TransformerBlockActionBase < TIn , TOut > ) _registrar . Resolve ( type ) ;
2518
26- public ConsumerBlockActionBase < TOut > CreateConsumerAction < TOut > ( Type type )
27- {
28- return ( ConsumerBlockActionBase < TOut > ) _registrar . Resolve ( type ) ;
29- }
30- }
31- }
19+ public ConsumerBlockActionBase < TOut > CreateConsumerAction < TOut > ( Type type ) =>
20+ ( ConsumerBlockActionBase < TOut > ) _registrar . Resolve ( type ) ;
21+ }
0 commit comments