protected virtual IBranch Visit(IVault copyCat, IBranch branch) { var copy = copyCat.GetOrCreateBranch(branch.VPath); copy.SetEntireMetadata(branch.Metadata); branch.GetBranches().ForEach(b => Visit(copyCat, b)); ((Branch)branch).GetValues(ValueKind.Regular).ForEach(v => Visit(copyCat, (IValue)v)); ((Branch)branch).GetValues(ValueKind.Internal).ForEach(v => VisitInternal(copyCat, v)); return copy; }
protected virtual IBranch Visit(IVault copyCat, IBranch branch) { var copy = copyCat.GetOrCreateBranch(branch.VPath); copy.SetEntireMetadata(branch.Metadata); branch.GetBranches().ForEach(b => Visit(copyCat, b)); ((Branch)branch).GetValues(ValueKind.Regular).ForEach(v => Visit(copyCat, (IValue)v)); ((Branch)branch).GetValues(ValueKind.Internal).ForEach(v => VisitInternal(copyCat, v)); return(copy); }