Exemplo n.º 1
0
 public DefaultErrorHost(BuildHostInstance buildHostInstance, Func <TBuildHostInstance, Exception, IElement> errorPolicy, Exception exception, LayoutContext layoutContext, LayoutHostSettings settings = default) :
     base(buildHostInstance, settings)
 {
     _errorPolicy   = errorPolicy;
     _exception     = exception;
     _layoutContext = layoutContext;
 }
Exemplo n.º 2
0
        public void Handle(BuildHostInstance buildHostInstance, Exception exception)
        {
            // reset the host
            buildHostInstance.Reset();

            // and now create an error host and assign that to the build host
            var errorHost = new DefaultErrorHost <TInstance>(buildHostInstance, LayoutErrorFormat, exception,
                                                             LayoutContext.Create(buildHostInstance.BuildOwner.ModelBag, buildHostInstance.HostEnvironment.LayoutResolver), buildHostInstance.HostEnvironment.HostSettings);

            buildHostInstance.SetHost(errorHost);
        }
Exemplo n.º 3
0
 public DefaultLayoutHost(BuildHostInstance buildHostInstance, LayoutHostSettings settings = default) : base(buildHostInstance, settings)
 {
     _rootContainer = buildHostInstance.RootContainer;
 }