Esempio n. 1
0
            static ClientDiffInfo FindClientDiffOfType(
                string path,
                ChangeCategoryType type,
                ITreeViewNode node)
            {
                if (node is ClientDiffInfo)
                {
                    ClientDiffInfo clientDiffInfo = (ClientDiffInfo)node;
                    ChangeCategory category       = (ChangeCategory)node.GetParent();

                    if (category.Type == type &&
                        clientDiffInfo.DiffWithMount.Difference.Path == path)
                    {
                        return((ClientDiffInfo)node);
                    }
                }

                for (int i = 0; i < node.GetChildrenCount(); i++)
                {
                    ClientDiffInfo result = FindClientDiffOfType(path, type, node.GetChild(i));
                    if (result != null)
                    {
                        return(result);
                    }
                }

                return(null);
            }
Esempio n. 2
0
            internal static ClientDiffInfo FromClientDiff(
                ClientDiff clientDiff,
                ChangeCategoryType type,
                UnityDiffTree diffTree)
            {
                foreach (ITreeViewNode node in diffTree.GetNodes())
                {
                    ClientDiffInfo result = FindClientDiffOfType(
                        clientDiff.Diff.Path,
                        type,
                        node);

                    if (result != null)
                    {
                        return(result);
                    }
                }

                return(null);
            }
Esempio n. 3
0
        public IEnumerable Handle(ChangeCategoryType c)
        {
            var item = Mapper.DynamicMap <CategoryTypeChanged>(c);

            yield return(item);
        }