Beispiel #1
0
        public void match_by_name()
        {
            source.IncludeTypesNamed(x => x.StartsWith("One"));

            theResultingGraph.ChainFor <OneEndpoint>(x => x.Report()).ShouldNotBeNull();
            theResultingGraph.ChainFor <OneController>(x => x.Report()).ShouldNotBeNull();
            theResultingGraph.ChainFor <TwoEndpoint>(x => x.Report()).ShouldBeNull();
        }
Beispiel #2
0
        private IEnumerable <ActionCall> findActions()
        {
            var source = new ActionSource();

            PackageRegistry.PackageAssemblies.Each(a => source.Applies.ToAssembly(a));
            source.IncludeTypesNamed(name => name.EndsWith("FubuDiagnostics"));

            return(source.As <IActionSource>().FindActions(null));
        }
        private Task <ActionCall[]> findActions(BehaviorGraph graph)
        {
            var source = new ActionSource();

            source.Applies.ToAssemblyContainingType <IActionBehavior>();
            graph.PackageAssemblies.Each(a => source.Applies.ToAssembly(a));
            source.IncludeTypesNamed(name => name.EndsWith("FubuDiagnostics"));
            source.IncludeTypes(type => type == typeof(FubuDiagnosticsEndpoint));

            return(source.As <IActionSource>().FindActions(null));
        }