Sage.SageContext.SageContext C# (CSharp) Method

SageContext() public method

Initializes a new instance of the SageContext class, using the specified ControllerContext.
public SageContext ( ControllerContext controllerContext, ProjectConfiguration config = null ) : System
controllerContext ControllerContext The current to use to initialize this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
return System
        public SageContext(ControllerContext controllerContext, ProjectConfiguration config = null)
            : this(controllerContext.HttpContext, config)
        {
            this.Route = controllerContext.RouteData.Route;
            this.RouteValues = new NameValueCollection();
            foreach (string key in controllerContext.RouteData.Values.Keys)
            {
                this.RouteValues[key] = controllerContext.RouteData.Values[key] as string;
            }
        }

Same methods

SageContext::SageContext ( HttpContext httpContext, ProjectConfiguration config = null ) : System
SageContext::SageContext ( System.Web.HttpContextBase httpContext, string>.Func pathMapper, ProjectConfiguration config = null ) : System
SageContext::SageContext ( System.Web.HttpContextBase httpContext, ProjectConfiguration config = null ) : System
SageContext::SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string>.Func pathMapper, ProjectConfiguration config = null ) : System
SageContext::SageContext ( System.Web.HttpContextBase httpContext, string categoryName, ProjectConfiguration config = null ) : System
SageContext::SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string localeName, ProjectConfiguration config = null ) : System
SageContext::SageContext ( SageContext context, ProjectConfiguration config = null, string>.Func pathMapper = null ) : System
SageContext::SageContext ( SageContext context, string categoryName, ProjectConfiguration config = null ) : System