UIAutomation.LogHelper.GetObjectPropertiesInfo C# (CSharp) Method

GetObjectPropertiesInfo() private method

private GetObjectPropertiesInfo ( CommonCmdletBase cmdlet ) : string
cmdlet CommonCmdletBase
return string
        internal virtual string GetObjectPropertiesInfo(CommonCmdletBase cmdlet)
        {
            string result = string.Empty;
            
            // http://stackoverflow.com/questions/2281972/how-to-get-a-list-of-properties-with-a-given-attribute
            foreach (PropertyInfo propertyInfo in cmdlet.GetType()
                     .GetProperties(BindingFlags.Public | BindingFlags.Instance)
                     .Where(p => p.GetCustomAttributes(typeof(UiaParameterAttribute), true).Length != 0)) {
                
                result += GetPropertyString(cmdlet, propertyInfo);
            }
            
            result = cmdlet.CmdletName(cmdlet) + result;
            
            return result;
        }