public override void OnUsing(AppModuleUsingArguments args) { AutofacContainerBuilder builder = args.AppSetup.GetAppContainerBuilder <AutofacContainerBuilder>(); builder.Building += Builder_Building; ConfigAppContainerBuilder configBuilder = args.AppSetup.GetAppContainerBuilder <ConfigAppContainerBuilder>(); configBuilder.ConfigObjectRegisted += ConfigBuilder_ConfigObjectRegisted; }
public override void OnUsing(AppModuleUsingArguments arguments) { var setup = arguments.AppSetup; var targetModule = arguments.TargetAppModule; ConfigAppContainerBuilder builder = setup.GetAppContainerBuilder <ConfigAppContainerBuilder>(); arguments.ScannedAttributeAndTypeInfos .Where(x => x.Attribute is ConfigAttribute) .ForEach(x => builder.AutoConfig(x)); }
public void Handle(AppSetup appSetup, IAppModule appModule, MethodInfo method, Attribute attribute) { if (method.ReturnType == typeof(void)) { return; } ConfigAppContainerBuilder builder = appSetup.GetAppContainerBuilder <ConfigAppContainerBuilder>(); ConfigCreatorAttribute config = (ConfigCreatorAttribute)attribute; builder.AddConfig(appModule, method); }