private object applyInterception(object rawValue, Type pluginType, IContext context) { try { // Intercept with the Instance-specific InstanceInterceptor return(_interceptor.Process(rawValue, context)); } catch (Exception e) { throw new StructureMapException(270, e, Name, pluginType); } }
/// <summary> /// Adds an Interceptor to only this PluginType /// </summary> /// <param name="interceptor"></param> /// <returns></returns> public CreatePluginFamilyExpression <PLUGINTYPE> InterceptWith(InstanceInterceptor interceptor) { _children.Add( graph => { var typeInterceptor = new PluginTypeInterceptor(typeof(PLUGINTYPE), (c, o) => interceptor.Process(o, c)); graph.InterceptorLibrary.AddInterceptor(typeInterceptor); }); return(this); }