public string GetAllProperties()
        {
            string text = "";

            this.propertySet = new List <DscResourcePropertyNode>();
            PSPropertyInfo prop = _dscResourceItem.Properties[Constants.DscResourceProperties];
            var            collectionProperties = (ICollection)prop.Value;
            int            count = 0;

            foreach (object dscProperty in collectionProperties)
            {
                string    lhs      = "";
                ArrayList valueSet = new ArrayList();

                var dscPropertyName = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderName).GetValue(dscProperty, null).ToString();
                var dscPropertyType = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderPropertyType).GetValue(dscProperty, null);
                var dscIsMandatory  = Convert.ToBoolean(dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderIsMandatory).GetValue(dscProperty, null));
                var dscValueSet     = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderValues).GetValue(dscProperty, null);

                if (dscValueSet.GetType().IsGenericType&& dscValueSet is IEnumerable)
                {
                    if (((List <String>)dscValueSet).Count > 0)
                    {
                        foreach (var item in ((List <String>)dscValueSet))
                        {
                            valueSet.Add(item);
                        }
                    }
                }
                // var dscPossibleValues =dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderValues).GetValue(dscProperty, null);
                var textInsertIsMandatory = "";
                if (dscIsMandatory)
                {
                    textInsertIsMandatory = " # IsMandatory";
                    lhs = dscPropertyName;
                }
                string descriptionOfProperty         = GetPropertyDescriptionFromFile(dscPropertyName);
                DscResourcePropertyNode propertyNode = new DscResourcePropertyNode(dscPropertyType.ToString(), valueSet, dscPropertyName, descriptionOfProperty)
                {
                    propertyType = dscPropertyType.ToString(), StringComment = textInsertIsMandatory, IsMandatory = dscIsMandatory, IsChosen = dscIsMandatory, propertyValueSet = valueSet
                };
                count++;
                this.propertySet.Add(propertyNode);
            }



            return(text);
        }
        public string GetAllProperties()
        {
            string text = "";
            this.propertySet = new List<DscResourcePropertyNode>();
            PSPropertyInfo prop = _dscResourceItem.Properties[Constants.DscResourceProperties];
            var collectionProperties = (ICollection)prop.Value;
            int count = 0;
            foreach (object dscProperty in collectionProperties)
            {
                string lhs = "";
                ArrayList valueSet = new ArrayList();

                var dscPropertyName = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderName).GetValue(dscProperty, null).ToString();
                var dscPropertyType = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderPropertyType).GetValue(dscProperty, null);
                var dscIsMandatory = Convert.ToBoolean(dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderIsMandatory).GetValue(dscProperty, null));
                var dscValueSet = dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderValues).GetValue(dscProperty, null);

                if (dscValueSet.GetType().IsGenericType && dscValueSet is IEnumerable)
                {
                    if (((List<String>)dscValueSet).Count > 0)
                    {
                        foreach (var item in ((List<String>)dscValueSet))
                        {
                            valueSet.Add(item);
                        }
                    }

                }
                // var dscPossibleValues =dscProperty.GetType().GetProperty(Constants.DscPropertyHeaderValues).GetValue(dscProperty, null);
                var textInsertIsMandatory = "";
                if (dscIsMandatory)
                {

                    textInsertIsMandatory = " # IsMandatory";
                    lhs = dscPropertyName;
                }
                string descriptionOfProperty = GetPropertyDescriptionFromFile(dscPropertyName);
                DscResourcePropertyNode propertyNode = new DscResourcePropertyNode(dscPropertyType.ToString(), valueSet, dscPropertyName, descriptionOfProperty) { propertyType = dscPropertyType.ToString(), StringComment = textInsertIsMandatory, IsMandatory = dscIsMandatory, IsChosen = dscIsMandatory, propertyValueSet = valueSet };
                count++;
                this.propertySet.Add(propertyNode);

            }

            return text;
        }