private void Handle(ApplicationEvent @event)
 {
     _initializations.Add(new Initializations(
                              usings: @event.GetValue(InitializationRequiredEvent.UsingsKey),
                              code: @event.GetValue(InitializationRequiredEvent.CallKey),
                              method: @event.TryGetValue(InitializationRequiredEvent.MethodKey),
                              priority: @event.TryGetValue(InitializationRequiredEvent.PriorityKey)));
 }
Esempio n. 2
0
 private void HandleDbContextRegistration(ApplicationEvent @event)
 {
     _dbContextRegistrations.Add(new DbContextContainerRegistration(
                                     @event.TryGetValue(ContainerRegistrationForDbContextEvent.UsingsKey),
                                     @event.GetValue(ContainerRegistrationForDbContextEvent.ConcreteTypeKey),
                                     @event.TryGetValue(ContainerRegistrationForDbContextEvent.ConcreteTypeTemplateIdKey) != null ? TemplateDependancy.OnTemplate(@event.TryGetValue(ContainerRegistrationForDbContextEvent.ConcreteTypeTemplateIdKey)) : null,
                                     @event.TryGetValue(ContainerRegistrationForDbContextEvent.OptionsKey)));
 }
Esempio n. 3
0
 private void Handle(ApplicationEvent @event)
 {
     _registrations.Add(new ContainerRegistration(
                            interfaceType: @event.TryGetValue(ContainerRegistrationEvent.InterfaceTypeKey),
                            concreteType: @event.GetValue(ContainerRegistrationEvent.ConcreteTypeKey),
                            lifetime: @event.TryGetValue(ContainerRegistrationEvent.LifetimeKey),
                            interfaceTypeTemplateDependency: @event.TryGetValue(ContainerRegistrationEvent.InterfaceTypeTemplateIdKey) != null ? TemplateDependancy.OnTemplate(@event.TryGetValue(ContainerRegistrationEvent.InterfaceTypeTemplateIdKey)) : null,
                            concreteTypeTemplateDependency: @event.TryGetValue(ContainerRegistrationEvent.ConcreteTypeTemplateIdKey) != null ? TemplateDependancy.OnTemplate(@event.TryGetValue(ContainerRegistrationEvent.ConcreteTypeTemplateIdKey)) : null));
 }
Esempio n. 4
0
 private void HandleInitialization(ApplicationEvent @event)
 {
     _initializations.Add(new Initializations(
                              usings: @event.GetValue(InitializationRequiredEvent.UsingsKey),
                              code: @event.GetValue(InitializationRequiredEvent.CallKey),
                              method: @event.TryGetValue(InitializationRequiredEvent.MethodKey),
                              priority: int.TryParse(@event.TryGetValue(InitializationRequiredEvent.PriorityKey), out var priority) ? priority : 0,
                              templateDependency: @event.TryGetValue(InitializationRequiredEvent.TemplateDependencyIdKey) != null ? TemplateDependancy.OnTemplate(@event.TryGetValue(InitializationRequiredEvent.TemplateDependencyIdKey)) : null));
 }
Esempio n. 5
0
 private void HandleServiceConfiguration(ApplicationEvent @event)
 {
     _serviceConfigurations.Add(new Initializations(
                                    usings: @event.GetValue(ServiceConfigurationRequiredEvent.UsingsKey),
                                    code: @event.GetValue(ServiceConfigurationRequiredEvent.CallKey),
                                    method: @event.TryGetValue(ServiceConfigurationRequiredEvent.MethodKey),
                                    priority: int.TryParse(@event.TryGetValue(ServiceConfigurationRequiredEvent.PriorityKey), out var priority) ? priority : 0,
                                    templateDependency: null));
 }
Esempio n. 6
0
 private void HandleServiceRegistration(ApplicationEvent @event)
 {
     _registrations.Add(new ContainerRegistration(
                            interfaceType: @event.TryGetValue("InterfaceType"),
                            concreteType: @event.GetValue("ConcreteType"),
                            lifetime: @event.TryGetValue("Lifetime"),
                            interfaceTypeTemplateDependency: @event.TryGetValue("InterfaceTypeTemplateId") != null ? TemplateDependancy.OnTemplate(@event.TryGetValue("InterfaceTypeTemplateId")) : null,
                            concreteTypeTemplateDependency: @event.TryGetValue("ConcreteTypeTemplateId") != null ? TemplateDependancy.OnTemplate(@event.TryGetValue("ConcreteTypeTemplateId")) : null));
 }
Esempio n. 7
0
 private void Handle(ApplicationEvent @event)
 {
     Profiles.Add(@event.GetValue(LaunchProfileRegistrationEvent.ProfileNameKey), new Profile
     {
         commandName    = @event.GetValue(LaunchProfileRegistrationEvent.CommandNameKey),
         launchBrowser  = bool.TryParse(@event.GetValue(LaunchProfileRegistrationEvent.LaunchBrowserKey), out var launchBrowser) && launchBrowser,
         launchUrl      = @event.TryGetValue(LaunchProfileRegistrationEvent.LaunchUrlKey),
         applicationUrl = @event.TryGetValue(LaunchProfileRegistrationEvent.ApplicationUrl),
     });
 private void Handle(ApplicationEvent @event)
 {
     Profiles.Add(@event.GetValue(LaunchProfileRegistrationEvent.ProfileNameKey), new Profile
     {
         commandName     = @event.GetValue(LaunchProfileRegistrationEvent.CommandNameKey),
         launchBrowser   = bool.TryParse(@event.GetValue(LaunchProfileRegistrationEvent.LaunchBrowserKey), out var launchBrowser) && launchBrowser,
         launchUrl       = @event.TryGetValue(LaunchProfileRegistrationEvent.LaunchUrlKey),
         applicationUrl  = @event.TryGetValue(LaunchProfileRegistrationEvent.ApplicationUrl),
         publishAllPorts = bool.TryParse(@event.TryGetValue(LaunchProfileRegistrationEvent.PublishAllPorts), out var publishAllPorts) && publishAllPorts,
         useSSL          = bool.TryParse(@event.TryGetValue(LaunchProfileRegistrationEvent.UseSSL), out var useSSL) && useSSL,
     });
Esempio n. 9
0
 private void Handle(ApplicationEvent @event)
 {
     _registrations.Add(new ContainerRegistration(@event.GetValue("InterfaceType"), @event.GetValue("ConcreteType"), @event.TryGetValue("Lifetime")));
 }