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)); }
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)); }
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)); }
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)); }