GetContext() public method

Create the context from request
public GetContext ( ) : object>.IDictionary
return object>.IDictionary
Esempio n. 1
0
        /// <summary>
        /// Get context data from <see cref="HttpActionContext" />
        /// </summary>
        /// <param name="actionContext"></param>
        /// <returns></returns>
        protected virtual IDictionary <string, object> GetInvocationContext(HttpActionContext actionContext)
        {
            var provider = new WebApiContextProvider(actionContext);
            var context  = provider.GetContext();

            context[Global.__flatwhite_outputcache_attribute] = this;
            return(context);
        }
Esempio n. 2
0
        /// <summary>
        /// Get context data from <see cref="HttpActionContext" />
        /// </summary>
        /// <param name="actionContext"></param>
        /// <returns></returns>
        protected virtual IDictionary <string, object> GetInvocationContext(HttpActionContext actionContext)
        {
            var provider = new WebApiContextProvider(actionContext);
            var context  = provider.GetContext();

            context[Global.__flatwhite_outputcache_attribute]   = this;
            context[WebApiExtensions.__webApi_dependency_scope] = actionContext.Request.GetDependencyScope();
            return(context);
        }
 /// <summary>
 /// Get context data from <see cref="HttpActionContext" />
 /// </summary>
 /// <param name="actionContext"></param>
 /// <returns></returns>
 protected virtual IDictionary<string, object> GetInvocationContext(HttpActionContext actionContext)
 {
     var provider = new WebApiContextProvider(actionContext);
     var context = provider.GetContext();
     context[Global.__flatwhite_outputcache_attribute] = this;
     context[WebApiExtensions.__webApi_dependency_scope] = actionContext.Request.GetDependencyScope();
     return context;
 }