Esempio n. 1
0
 public abstract void HandleRequest(WebContext <T> webContext, ISharpboxController <T> controller);
Esempio n. 2
0
        /// <summary>
        /// This will: (1) Call the controller facade pattern to add this error to the Controller which in turn sets !IsModelValid. (2) Add the error to the WebResponse using the overload method and (3) set the WebContext as faulted.
        /// </summary>
        /// <param name="webContext"></param>
        /// <param name="controller"></param>
        /// <param name="key"></param>
        /// <param name="modelError"></param>
        public void AddModelStateError(WebContext <T> webContext, ISharpboxController <T> controller, string key, ModelError modelError)
        {
            controller.AddErrorToModelState(key, modelError.ErrorMessage);

            this.AddModelStateError(webContext, key, modelError);
        }
Esempio n. 3
0
 /// <summary>
 /// Used internally for non error lifecycle events
 /// </summary>
 /// <param name="webContext"></param>
 /// <param name="state"></param>
 /// <param name="message"></param>
 protected void PopulateLifeCycleTrail(WebContext <T> webContext, LifeCycleHandlerState state = null, string message = null)
 {
     webContext.WebResponse.AddLifeCycleTrailItem(this.Name, state ?? LifeCycleHandlerState.Success, message ?? string.Empty);
 }