/// <summary> /// Adds a catalog wide interceptor. If adding more than one catalog wide interceptor, /// it is wrapped in <see cref="CompositeValueInterceptor"/> instance. /// </summary> /// <param name="interceptor">Interceptor to be added.</param> /// <returns><see cref="InterceptionConfiguration"/> instance to enable fluent configuration.</returns> public InterceptionConfiguration AddInterceptor(IExportedValueInterceptor interceptor) { if (interceptor == null) throw new ArgumentNullException("interceptor"); this.interceptors.Add(interceptor); return this; }
/// <summary> /// Initializes a new instance of the <see cref="PredicateInterceptionCriteria"/> class. /// </summary> /// <param name="interceptor">The <see cref="IExportedValueInterceptor"/> instance.</param> /// <param name="predicate">The predicate.</param> public PredicateInterceptionCriteria(IExportedValueInterceptor interceptor, Func<ComposablePartDefinition, bool> predicate) { if (interceptor == null) throw new ArgumentNullException("interceptor"); if (predicate == null) throw new ArgumentNullException("predicate"); Interceptor = interceptor; Predicate = predicate; }
public InterceptingComposablePartDefinition(ComposablePartDefinition interceptedPartDefinition, IExportedValueInterceptor valueInterceptor) { interceptedPartDefinition.ShouldNotBeNull("interceptedPartDefinition"); valueInterceptor.ShouldNotBeNull("valueInterceptor"); InterceptedPartDefinition = interceptedPartDefinition; _valueInterceptor = valueInterceptor; }
public InterceptingComposablePartDefinition(ComposablePartDefinition interceptedPartDefinition, IExportedValueInterceptor valueInterceptor) { if (interceptedPartDefinition == null) throw new ArgumentNullException("interceptedPartDefinition"); if (valueInterceptor == null) throw new ArgumentNullException("valueInterceptor"); InterceptedPartDefinition = interceptedPartDefinition; this.valueInterceptor = valueInterceptor; }
public InterceptingComposablePart(ComposablePart interceptedPart, IExportedValueInterceptor valueInterceptor) { if (interceptedPart == null) throw new ArgumentNullException("interceptedPart"); if (valueInterceptor == null) throw new ArgumentNullException("valueInterceptor"); InterceptedPart = interceptedPart; this.valueInterceptor = valueInterceptor; this.values = new Dictionary<ExportDefinition, object>(); }
public InterceptingComposablePart(ComposablePart interceptedPart, IExportedValueInterceptor valueInterceptor) { interceptedPart.ShouldNotBeNull("interceptedPart"); valueInterceptor.ShouldNotBeNull("valueInterceptor"); InterceptedPart = interceptedPart; _valueInterceptor = valueInterceptor; _values = new Dictionary<ExportDefinition, object>(); }
public InterceptingCatalog(ComposablePartCatalog interceptedCatalog, IExportedValueInterceptor valueInterceptor, IList<IExportHandler> handlers) { interceptedCatalog.ShouldNotBeNull("interceptedCatalog"); valueInterceptor.ShouldNotBeNull("valueInterceptor)"); _interceptedCatalog = interceptedCatalog; _valueInterceptor = valueInterceptor; _handlers = handlers; InitializeHandlers(); }
/// <summary> /// Adds a catalog wide interceptor. If adding more than one catalog wide interceptor, /// it is wrapped in <see cref="CompositeValueInterceptor"/> instance. /// </summary> /// <param name="interceptor">Interceptor to be added.</param> /// <returns><see cref="InterceptionConfiguration"/> instance to enable fluent configuration.</returns> public InterceptionConfiguration AddInterceptor(IExportedValueInterceptor interceptor) { if (interceptor == null) { throw new ArgumentNullException("interceptor"); } this.interceptors.Add(interceptor); return(this); }
/// <summary> /// Initializes a new instance of the <see cref="PredicateInterceptionCriteria"/> class. /// </summary> /// <param name="interceptor">The <see cref="IExportedValueInterceptor"/> instance.</param> /// <param name="predicate">The predicate.</param> public PredicateInterceptionCriteria(IExportedValueInterceptor interceptor, Func <ComposablePartDefinition, bool> predicate) { if (interceptor == null) { throw new ArgumentNullException("interceptor"); } if (predicate == null) { throw new ArgumentNullException("predicate"); } Interceptor = interceptor; Predicate = predicate; }
/// <summary> /// Initializes a new instance of the <see cref="InterceptingComposablePartDefinition"/> class. /// </summary> /// <param name="interceptedPartDefinition">The <see cref="ComposablePartDefinition"/> being intercepted.</param> /// <param name="valueInterceptor">The <see cref="IExportedValueInterceptor"/> instance.</param> public InterceptingComposablePartDefinition(ComposablePartDefinition interceptedPartDefinition, IExportedValueInterceptor valueInterceptor) { if (interceptedPartDefinition == null) { throw new ArgumentNullException("interceptedPartDefinition"); } if (valueInterceptor == null) { throw new ArgumentNullException("valueInterceptor"); } InterceptedPartDefinition = interceptedPartDefinition; this.valueInterceptor = valueInterceptor; }
/// <summary> /// Initializes a new instance of the <see cref="InterceptingComposablePart"/> class. /// </summary> /// <param name="interceptedPart">The <see cref="ComposablePart"/> being intercepted.</param> /// <param name="valueInterceptor">The <see cref="IExportedValueInterceptor"/> instance.</param> public InterceptingComposablePart(ComposablePart interceptedPart, IExportedValueInterceptor valueInterceptor) { if (interceptedPart == null) { throw new ArgumentNullException("interceptedPart"); } if (valueInterceptor == null) { throw new ArgumentNullException("valueInterceptor"); } InterceptedPart = interceptedPart; this.valueInterceptor = valueInterceptor; this.values = new Dictionary <ExportDefinition, object>(); }
public LoggingInterceptionCriteria(IExportedValueInterceptor interceptor) { Interceptor = interceptor; }
/// <summary> /// Initializes a new instance of the <see cref="DisposableInterceptingComposablePart"/> class. /// </summary> /// <param name="interceptedPart">The <see cref="ComposablePart"/> being intercepted.</param> /// <param name="valueInterceptor">The <see cref="IExportedValueInterceptor"/> instance.</param> public DisposableInterceptingComposablePart(ComposablePart interceptedPart, IExportedValueInterceptor valueInterceptor) : base(interceptedPart, valueInterceptor) { }
public DisposableInterceptingComposablePart(ComposablePart interceptedPart, IExportedValueInterceptor valueInterceptor) : base(interceptedPart, valueInterceptor) { }
public InterceptingCatalog(ComposablePartCatalog interceptedCatalog, IExportedValueInterceptor valueInterceptor) : this(interceptedCatalog, valueInterceptor, new List<IExportHandler>()) { }