public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            var antiForgeryTokenValidator = new AjaxValidateAntiForgeryTokenAttribute();

            antiForgeryTokenValidator.Validate(requestContext);
            return(new HttpHandler(_portalName, requestContext));
        }
示例#2
0
        /// <summary>
        /// Provides the object that processes the request.
        /// </summary>
        /// <param name="requestContext">An object that encapsulates information about the request.</param>
        /// <returns></returns>
        public virtual IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            var antiForgeryTokenValidator = new AjaxValidateAntiForgeryTokenAttribute();

            antiForgeryTokenValidator.Validate(requestContext);
            Guid parsedPortalScopeId;
            var  portalScopeId = Guid.TryParse(requestContext.RouteData.Values["__portalScopeId__"] as string, out parsedPortalScopeId)
                                ? new Guid?(parsedPortalScopeId)
                                : null;

            var entityLogicalName = requestContext.RouteData.Values["entityLogicalName"] as string;

            return(new CmsEntitySetHandler(PortalName, portalScopeId, entityLogicalName));
        }