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); }
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); }
public IEnumerable Handle(ChangeCategoryType c) { var item = Mapper.DynamicMap <CategoryTypeChanged>(c); yield return(item); }