Ntreev.Library.Commands.CommandLineParser.IsSwitchVisible C# (CSharp) Method

IsSwitchVisible() protected method

protected IsSwitchVisible ( SwitchDescriptor descriptor ) : bool
descriptor SwitchDescriptor
return bool
        protected virtual bool IsSwitchVisible(SwitchDescriptor descriptor)
        {
            var attr = descriptor.Attributes.FirstOrDefault(item => item is BrowsableAttribute) as BrowsableAttribute;
            if (attr == null)
                return true;
            return attr.Browsable;
        }