public static IUIContextHolder GetUIContextHolder(this IWorkingContext workingContext)
        {
            PrimaryProjectUiWorkingContextManagerDlc dlc = workingContext.GetPrimaryProjectUiWorkingContextManagerDlc()
                                                           as PrimaryProjectUiWorkingContextManagerDlc;
            PrimaryProjectUiWorkingContextManager manager = Reflector.GetInstancePropertyByName(dlc, "Forwardee", ReflectionWays.SystemReflection)
                                                            as PrimaryProjectUiWorkingContextManager;
            var proxy = new PrimaryProjectUiWorkingContextManagerProxy(manager);

            return(proxy.IUIContextHolder);
        }
        public static PrimaryProjectUiWorkingContextManagerProxy GetPrimaryProjectUiWorkingContextManagerProxy([NotNull] this IWorkingContext workingContext)
        {
            PrimaryProjectUiWorkingContextManagerDlc dlc = workingContext.GetPrimaryProjectUiWorkingContextManagerDlc()
                                                           as PrimaryProjectUiWorkingContextManagerDlc;
            PrimaryProjectUiWorkingContextManager manager = Reflector.GetInstancePropertyByName(dlc, "Forwardee", ReflectionWays.SystemReflection)
                                                            as PrimaryProjectUiWorkingContextManager;
            PrimaryProjectUiWorkingContextManagerProxy proxy = new PrimaryProjectUiWorkingContextManagerProxy(manager);

            return(proxy);
        }
Ejemplo n.º 3
0
        public static PrimaryProjectUiWorkingContextManagerProxy GetPrimaryProjectUiWorkingContextManagerProxy(this IWorkingContext workingContext)
        {
            var dlc = workingContext.GetPrimaryProjectUiWorkingContextManagerDlc()
                      as PrimaryProjectUiWorkingContextManagerDlc;
            var manager = Reflector.GetInstancePropertyByName(dlc, "Forwardee", ReflectionWays.SystemReflection)
                          as PrimaryProjectUiWorkingContextManager;

            if (PrimaryProjectUiWorkingContextManagerProxy.Instance == null)
            {
                var proxy = new PrimaryProjectUiWorkingContextManagerProxy(manager);
                return(proxy);
            }
            else
            {
                return(PrimaryProjectUiWorkingContextManagerProxy.Instance);
            }
        }