public ObjectBuilder(PipelineGraph pipeline, InterceptorLibrary library)
        {
            if (pipeline == null) throw new ArgumentNullException("pipeline");

            _pipeline = pipeline;
            _library = library;
        }
        public void SetUp()
        {
            graph = new PluginGraph();
            pipeline = new PipelineGraph(graph);
            library = new InterceptorLibrary();

            builder = new ObjectBuilder(pipeline, library);
        }
Beispiel #3
0
 public void ImportFrom(InterceptorLibrary source)
 {
     lock (_locker)
     {
         _analyzedInterceptors.Clear();
         _interceptors.AddRange(source._interceptors);
     }
 }
 public void ImportFrom(InterceptorLibrary source)
 {
     lock (_locker)
     {
         _analyzedInterceptors.Clear();
         _interceptors.AddRange(source._interceptors);
     }
 }
        public void Import_from_gets_all_interceptors_and_resets_the_type_filter()
        {
            var sourceLibrary = new InterceptorLibrary();
            sourceLibrary.AddInterceptor(new MockTypeInterceptor(typeof (string)));
            sourceLibrary.FindInterceptor(typeof (string));

            var destinationLibrary = new InterceptorLibrary();
            destinationLibrary.AddInterceptor(new MockTypeInterceptor(typeof (string)));

            destinationLibrary.ImportFrom(sourceLibrary);

            InstanceInterceptor[] interceptors = destinationLibrary.FindInterceptors(typeof (string));
            Assert.AreEqual(2, interceptors.Length);
        }
        public void SetUp()
        {
            _interceptor1 = new MockTypeInterceptor(typeof (string));
            _interceptor2 = new MockTypeInterceptor(typeof (int), typeof (double));
            _interceptor3 = new MockTypeInterceptor(typeof (string), typeof (bool));
            _interceptor4 = new MockTypeInterceptor(typeof (string), typeof (double));

            _library = new InterceptorLibrary();
            _library.AddInterceptor(_interceptor1);
            _library.AddInterceptor(_interceptor2);
            _library.AddInterceptor(_interceptor3);
            _library.AddInterceptor(_interceptor4);
        }
 public ValidationBuildSession(PipelineGraph pipelineGraph, InterceptorLibrary interceptorLibrary)
     : base(pipelineGraph, interceptorLibrary)
 {
 }