public void match_by_types() { source.IncludeTypes(x => x.Name.StartsWith("One")); theResultingGraph.ChainFor <OneEndpoint>(x => x.Report()).ShouldNotBeNull(); theResultingGraph.ChainFor <OneController>(x => x.Report()).ShouldNotBeNull(); theResultingGraph.ChainFor <TwoEndpoint>(x => x.Report()).ShouldBeNull(); }
private IEnumerable <ActionCall> findActions() { var source = new ActionSource(); source.Applies.ToAssemblyContainingType <IActionBehavior>(); PackageRegistry.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)); }
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)); }
public static ActionSource IncludeTypeNamesSuffixed(this ActionSource source, params string[] suffix) { source.IncludeTypes(y => suffix.Any(z => y.Name.EndsWith(z))); return(source); }