Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorable registration order may block commands from being intercepted when in Agent connected mode #5

Open
jakkaj opened this issue Jan 31, 2018 · 0 comments

Comments

@jakkaj
Copy link
Contributor

jakkaj commented Jan 31, 2018

In: https://github.com/MissionMarsFourthHorizon/operation-max/blob/master/CSharp/exercise7-HandOffToHuman.md

When in "Agent" mode, you cannot type "resume" to disconnect as expected.

This seems to be because the scoreables are registered out of order in Application_Start

builder.Register(c => new RouterScorable(c.Resolve<IBotData>(), c.Resolve<ConversationReference>(), c.Resolve<Provider>()))
                .As<IScorable<IActivity, double>>().InstancePerLifetimeScope();
            builder.Register(c => new CommandScorable(c.Resolve<IBotData>(), c.Resolve<ConversationReference>(), c.Resolve<Provider>()))
                .As<IScorable<IActivity, double>>().InstancePerLifetimeScope();

should be

builder.Register(c => new CommandScorable(c.Resolve<IBotData>(), c.Resolve<ConversationReference>(), c.Resolve<Provider>()))
                .As<IScorable<IActivity, double>>().InstancePerLifetimeScope();
builder.Register(c => new RouterScorable(c.Resolve<IBotData>(), c.Resolve<ConversationReference>(), c.Resolve<Provider>()))
                .As<IScorable<IActivity, double>>().InstancePerLifetimeScope();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant