public CheckItem(Rule.KeepAliveCallback callback) { m_callback = callback; m_dispatcher = new RuleDispatcher(this); }
private void DoRunTest(Rule rule, List<TypeDefinition> types, AssemblyCache cache) { RuleDispatcher dispatcher = new RuleDispatcher(); rule.Register(dispatcher); m_failed = false; dispatcher.Dispatch(new BeginTesting()); dispatcher.Dispatch(Assembly); dispatcher.Dispatch(new BeginTypes()); foreach (TypeDefinition t in types) dispatcher.Dispatch(t); dispatcher.Dispatch(new EndTypes()); foreach (MethodInfo info in cache.Methods) { dispatcher.Dispatch(info); } dispatcher.DispatchCallGraph(); dispatcher.Dispatch(new EndTesting()); }
/// <remarks>Callback will be called periodically as types and methods are checked. Smokey /// uses this with a watchdog class to ensure no rule falls into an infinite loop.</remarks> public AnalyzeAssembly(Rule.KeepAliveCallback callback) { m_callback = callback; m_checker = new CheckItem(callback); }