Exemplo n.º 1
0
 public PrependDsl Prepend <TPrepend>(
     Func <TContext, bool> predicate = null, bool @default = false)
     where TPrepend : TPlugin
 {
     return(Prepend(ConditionalPlugin <TPlugin, TContext>
                    .Create <TPrepend>(predicate ?? DefaultPredicate, Plugins.Singleton), @default));
 }
Exemplo n.º 2
0
 public ConditionalPluginsDsl <TPlugin, TContext> WithOrAppend <TReplacement>(
     TReplacement instance, Func <TContext, bool> predicate = null,
     bool dispose = false, bool @default = false)
     where TReplacement : TPlugin
 {
     return(WithOrAppend(ConditionalPlugin <TPlugin, TContext>
                         .Create(instance, predicate ?? _defaultPredicate, dispose), @default));
 }
Exemplo n.º 3
0
 public ConditionalPluginsDsl <TPlugin, TContext> WithOrAppend <TReplacement>(
     Func <TContext, bool> predicate = null, bool @default = false)
     where TReplacement : TPlugin
 {
     return(WithOrAppend(ConditionalPlugin <TPlugin, TContext>
                         .Create <TReplacement>(predicate ?? _defaultPredicate,
                                                _plugins.Singleton), @default));
 }
Exemplo n.º 4
0
 public PrependDsl Prepend <TPrepend>(
     TPrepend instance, Func <TContext, bool> predicate = null,
     bool dispose = false, bool @default = false)
     where TPrepend : TPlugin
 {
     return(Prepend(ConditionalPlugin <TPlugin, TContext>
                    .Create(instance, predicate ?? DefaultPredicate, dispose), @default));
 }