public static void RegisterAll <TView>()
        {
            var views = Enum.GetValues(typeof(TView)).Cast <TView>();

            foreach (TView view in views)
            {
                MemberInfo        viewInfo = typeof(TView).GetMember(view.ToString()).FirstOrDefault();
                ViewTypeAttribute viewType = viewInfo.GetCustomAttributes <ViewTypeAttribute>().FirstOrDefault();
                if (viewType != null)
                {
                    NavigationServiceHelper <TView> .RegisterView(view, viewType.ViewType);
                }
            }
        }
Exemple #2
0
        public static void RegisterAll <TView>()
        {
            var views = Enum.GetValues(typeof(TView)).Cast <TView>();

            foreach (TView view in views)
            {
                MemberInfo           viewInfo    = typeof(TView).GetMember(view.ToString()).FirstOrDefault();
                DescriptionAttribute description = (DescriptionAttribute)viewInfo.GetCustomAttributes(typeof(DescriptionAttribute)).FirstOrDefault();

                if (description != null)
                {
                    NavigationServiceHelper <TView> .RegisterView(view, description.Description);
                }
            }
        }