private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            var pair = (KeyValuePair <string, ReferencedProperty>)allPropsLV.SelectedItem;
            ReferencedProperty prop = pair.Value;
            var sb = new StringBuilder();

            foreach (ReferencedValues val in prop.PropertyValues.Values)
            {
                if (String.IsNullOrEmpty(val.EvaluatedValue))
                {
                    sb.AppendFormat("<blank>\n");
                }
                else
                {
                    sb.AppendFormat("{0}\n", val.EvaluatedValue);
                }

                foreach (MSBProject proj in val.Projects)
                {
                    sb.AppendFormat("\t{0}\n", proj.FullPath);
                }
            }
            string windowTitle = String.Format("All Properties values for property: {0}", prop.Name);
            var    stuff       = new TextWindow(windowTitle, sb.ToString());

            stuff.Show();
        }
        public void TestReferencedPropToString()
        {
            ReferencedProperty p = extractor.AllFoundProperties["Configuration"];

            Assert.AreEqual("ReferenceProperty Configuration, usedby: 3 projects", p.ToString());

            var propVals = p.PropertyValues;

            Assert.AreEqual("ReferencedValues Debug, Count: 3 for Configuration", propVals["Debug"].ToString());
        }
        public void TestMoveValue()
        {
            extractor.PropertySheetPath = "TestData\\test.props";
            ReferencedProperty refProp = extractor.AllFoundProperties["AssemblyName"];
            var vals             = refProp.PropertyValues;
            ReferencedValues val = vals["a"];
            int before           = refProp.UsedCount;

            extractor.MoveValue(val);
            int after = refProp.UsedCount;

            Assert.AreEqual(before - 1, after);
            Assert.AreEqual(2, refProp.Projects.Count());
            var projs = (from p in refProp.Projects
                         let name = Path.GetFileName(p.FullPath)
                                    orderby name ascending
                                    select name).ToList();

            Assert.AreEqual("B.csproj", projs[0]);
            Assert.AreEqual("C.csproj", projs[1]);
            Assert.AreEqual(2, refProp.PropertyValues.Count());
        }