protected virtual bool Equals(ScreenRepositoryCacheKey screenRepositoryCacheKey)
 {
     if (screenRepositoryCacheKey == null)
     {
         return(false);
     }
     return(Equals(title, screenRepositoryCacheKey.title) && Equals(screenType, screenRepositoryCacheKey.screenType));
 }
Esempio n. 2
0
        public virtual T Get <T>(string title, InitializeOption option) where T : AppScreen
        {
            ClearClosedScreens();
            AppScreen screen;
            var       repositoryCacheKey = new ScreenRepositoryCacheKey(title, typeof(T));

            if (!screenCache.TryGetValue(repositoryCacheKey, out screen))
            {
                Window window = applicationSession.Application.GetWindow(title, IdentifiedOption <T>(option));
                screen = GetScreen <T>(window);
                screenCache.Add(repositoryCacheKey, screen);
            }

            if (screen != null)
            {
                sessionReport.Next(typeof(T));
            }
            return((T)screen);
        }
 protected virtual bool Equals(ScreenRepositoryCacheKey screenRepositoryCacheKey)
 {
     if (screenRepositoryCacheKey == null) return false;
     return Equals(title, screenRepositoryCacheKey.title) && Equals(screenType, screenRepositoryCacheKey.screenType);
 }