public static string ShowVisibility(Visibility vis)
        {
            switch (vis)
            {
            case Visibility.Public:
                return(vis.GetDescription());

            case Visibility.Protected:
                return(Properties.Settings.Default.PublicProtected ? "" : vis.GetDescription());

            case Visibility.Private:
                return(Properties.Settings.Default.PublicPrivate ? "" : vis.GetDescription());

            case Visibility.Resticted:
                return(Properties.Settings.Default.PublicRestricted ? "" : vis.GetDescription());

            case Visibility.Hidden:
                return("");

            default:
                return("");
            }
        }
Exemple #2
0
        public void Test_GetDescription_FallBack()
        {
            Visibility vi = Visibility.Hidden;

            vi.GetDescription().Should().Be("Hidden");
        }