Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public AboutCommandMenuItem(ICommand command)
- : base(command)
- {
- }
- public OptionsCommandMenuItem(ICommand command)
- : base(command)
- {
- }
- _kernel.Bind<ICommand>().To<AboutCommand>().WhenInjectedExactlyInto<AboutCommandMenuItem>();
- _kernel.Bind<ICommand>().To<OptionsCommand>().WhenInjectedExactlyInto<OptionsCommandMenuItem>();
- _kernel.Bind(t => t.FromThisAssembly()
- .SelectAllClasses()
- .InNamespaceOf<ICommand>()
- .EndingWith("Command")
- .Where(type => type.GetInterfaces().Contains(typeof(ICommand)))
- .BindAllInterfaces()
- .Configure(binding => binding
- .When(request => request.Service == typeof(ICommand)
- && request.Target.Member.DeclaringType.Name.StartsWith(?)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement