コード例 #1
0
        public void Process_to_PluginGraph()
        {
            var graph = new PluginGraph();
            var scanner = new DefaultConventionScanner();

            var registry = new Registry();

            scanner.Process(typeof (Convention), registry);

            registry.ConfigureWithoutScanning(graph);

            Assert.IsFalse(graph.ContainsFamily(typeof (IServer)));
            Assert.IsTrue(graph.ContainsFamily(typeof(IConvention)));

            PluginFamily family = graph.FindFamily(typeof (IConvention));
            family.Seal();
            Assert.AreEqual(1, family.InstanceCount);
        }