public JasperOptionsBuilder(string assemblyName = null) { HttpRoutes = new HttpSettings(); Services = _applicationServices; establishApplicationAssembly(assemblyName); var name = ApplicationAssembly?.GetName().Name ?? "JasperApplication"; CodeGeneration = new JasperGenerationRules($"{name.Replace(".", "_")}_Generated"); CodeGeneration.Sources.Add(new NowTimeVariableSource()); CodeGeneration.Assemblies.Add(GetType().GetTypeInfo().Assembly); CodeGeneration.Assemblies.Add(ApplicationAssembly); _baseServices = new JasperServiceRegistry(this); Settings = new JasperSettings(this); Settings.BindToConfigSection <JasperOptions>("Jasper"); Publish = new PublishingExpression(Settings, Messaging); Settings.Replace(HttpRoutes); }
public JasperRegistry() { Configuration.SetBasePath(Directory.GetCurrentDirectory()); HttpRoutes = new HttpSettings(); Services = _applicationServices; establishApplicationAssembly(); var name = ApplicationAssembly?.GetName().Name ?? "JasperApplication"; CodeGeneration = new JasperGenerationRules($"{name.Replace(".", "_")}_Generated"); _baseServices = new JasperServiceRegistry(this); Settings = new JasperSettings(this); Settings.BindToConfigSection <MessagingSettings>("Messaging"); deriveServiceName(); Publish = new PublishingExpression(Settings, Messaging); Hosting = this; // ASP.Net Core will freak out if this isn't there EnvironmentConfiguration[WebHostDefaults.ApplicationKey] = ApplicationAssembly.FullName; Settings.Replace(HttpRoutes); }