private IntegratedPipelineBlueprint InitializeBlueprint() { IntegratedPipelineBlueprintStage firstStage = null; string appStartup = ConfigurationManager.AppSettings[Constants.OwinAppStartup]; var loader = new DefaultLoader(); Action<IAppBuilder> startup = loader.Load(appStartup ?? string.Empty); if (startup == null) { return null; } var appContext = OwinBuilder.Build(builder => { EnableIntegratedPipeline(builder, stage => firstStage = stage); startup.Invoke(builder); }); if (appContext == null) { return null; } string basePath = Utils.NormalizePath(HttpRuntime.AppDomainAppVirtualPath); return new IntegratedPipelineBlueprint(appContext, firstStage, basePath); }
internal static OwinAppContext Build() { string appStartup = ConfigurationManager.AppSettings[Constants.OwinAppStartup]; var loader = new DefaultLoader(); Action<IAppBuilder> startup = loader.Load(appStartup ?? string.Empty); return Build(startup); }
public static AppDelegate DefaultFactory() { var loader = new DefaultLoader(); var builder = new AppBuilder(); var startupName = ConfigurationManager.AppSettings["owin:Startup"]; var startupMethod = loader.Load(startupName); if (startupMethod != null) { startupMethod.Invoke(builder); } return (AppDelegate)builder.Build(typeof(AppDelegate)); }
internal static Action<IAppBuilder> GetAppStartup() { string appStartup = ConfigurationManager.AppSettings[Constants.OwinAppStartup]; var loader = new DefaultLoader(new ReferencedAssembliesWrapper()); IList<string> errors = new List<string>(); Action<IAppBuilder> startup = loader.Load(appStartup ?? string.Empty, errors); if (startup == null) { throw new EntryPointNotFoundException(Resources.Exception_AppLoderFailure + Environment.NewLine + " - " + string.Join(Environment.NewLine + " - ", errors) + (IsAutomaticAppStartupEnabled ? Environment.NewLine + Resources.Exception_HowToDisableAutoAppStartup : string.Empty) + Environment.NewLine + Resources.Exception_HowToSpecifyAppStartup); } return startup; }
public virtual Func<string, Action<IAppBuilder>> Create(Func<string, Action<IAppBuilder>> nextLoader) { var loader = new DefaultLoader(nextLoader, _activator.Activate); return loader.Load; }
/// <summary> /// Create a new chained app loader. /// </summary> /// <param name="nextLoader"></param> /// <returns></returns> public virtual AppLoaderFunc Create(AppLoaderFunc nextLoader) { var loader = new DefaultLoader(nextLoader, _activator.Activate); return loader.Load; }