コード例 #1
0
ファイル: VaultVisitor.cs プロジェクト: xeno-by/datavault
 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;
 }
コード例 #2
0
        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);
        }