コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public FindPluginResponse(FindPlugin request)
 {
     this.Request = request;
 }
コード例 #4
0
 public FindPluginResponse(FindPlugin request)
 {
     this.Request = request;
 }