BExIS.Ddm.Providers.DummyProvider.Helpers.MetadataReader.GetAllTextValuesByNodeDistinct C# (CSharp) Method

GetAllTextValuesByNodeDistinct() public static method

public static GetAllTextValuesByNodeDistinct ( string nodeName, List metadataList ) : IEnumerable
nodeName string
metadataList List
return IEnumerable
        public static IEnumerable<TextValue> GetAllTextValuesByNodeDistinct(string nodeName, List<Metadata> metadataList)
        {
            List<TextValue> l = new List<TextValue>();

            foreach (Metadata m in metadataList)
            {
                foreach (XmlNode x in m.GetValueFromNode(nodeName))
                {
                    bool isIn = false;
                    foreach (TextValue s in l)
                    {
                        if (x.InnerText == s.Value) isIn = true;
                    }

                    if(isIn == false){
                        TextValue tv = new TextValue();
                        tv.Name = x.InnerText;
                        tv.Value=x.InnerText;
                        l.Add(tv);
                    };
                    //l.Add(x.InnerText);
                }
            }

            return l;
        }