コード例 #1
0
ファイル: PortalViewFactory.cs プロジェクト: brhinescot/Loom
        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);
        }
コード例 #2
0
ファイル: PortalViewFactory.cs プロジェクト: brhinescot/Loom
        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);
        }
コード例 #3
0
ファイル: PortalCam.cs プロジェクト: r-github/UnityPortals
    // Use this for initialization
    void Start()
    {
        cam = GetComponent <Camera>();

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