public IEnumerable <PluginDescriptor> Plugins(PluginFilter filter) { this.log.DebugFormat("Finding plugins statisfying {0}", filter); FindPlugin cmd = new FindPlugin() { Filter = filter }; PluginDescriptor[] foundPlugins = new PluginDescriptor[0]; this.bus.PublishRequest(cmd, cb => { // cb.SetRequestExpiration(TimeSpan.FromSeconds(10)); <--- Bug that causes exception on RabbitMq (fixed in trunk but not on NuGet) cb.HandleTimeout(TimeSpan.FromSeconds(10), msg => { this.log.WarnFormat("Timeout requesting {0}", filter); }); cb.Handle <FindPluginResponse>((context, message) => { foundPlugins = message.FoundPlugins; this.log.DebugFormat("Found {0} plugins for {1}", foundPlugins.Length, filter); }); }); return(foundPlugins); }
public IEnumerable<PluginDescriptor> Plugins(PluginFilter filter) { this.log.DebugFormat("Finding plugins statisfying {0}", filter); FindPlugin cmd = new FindPlugin() { Filter = filter }; PluginDescriptor[] foundPlugins = new PluginDescriptor[0]; this.bus.PublishRequest(cmd, cb => { // cb.SetRequestExpiration(TimeSpan.FromSeconds(10)); <--- Bug that causes exception on RabbitMq (fixed in trunk but not on NuGet) cb.HandleTimeout(TimeSpan.FromSeconds(10), msg => { this.log.WarnFormat("Timeout requesting {0}", filter); }); cb.Handle<FindPluginResponse>((context, message) => { foundPlugins = message.FoundPlugins; this.log.DebugFormat("Found {0} plugins for {1}", foundPlugins.Length, filter); }); }); return foundPlugins; }
public FindPluginResponse(FindPlugin request) { this.Request = request; }