Esempio n. 1
0
        private static void InitializeView(PortalView view)
        {
            IPortalContext context = PortalContext.Current;
            IViewResult    result  = context.Request.Result as IViewResult;

            if (result == null)
            {
                return;
            }

            view.ViewData = context.Request.Result.ViewData;
            view.InitializeContext(PortalContext.Current);
        }
Esempio n. 2
0
        private IHttpHandler GetPortalHandler(HttpContext context, string requestType, string virtualPath, string path)
        {
            IHttpHandler handler = base.GetHandler(context, requestType, virtualPath, path);

            PortalTrace.Write("PortalViewFactory", "GetHandler", "End base.GetHandler");

            PortalView view = handler as PortalView;

            PortalTrace.WriteIf(view == null, "PortalViewFactory", "GetHandler", "'{0}' is not a portal view. Skipping initialization.", virtualPath);
            if (view != null)
            {
                PortalTrace.Write("PortalViewFactory", "GetHandler", "Initializing portal view for '{0}'", virtualPath);
                InitializeView(view);
            }

            return(handler);
        }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        cam = GetComponent <Camera>();

        pv = portalEntry.GetComponent <PortalView>();
    }