Exemplo n.º 1
0
        public static XmlVaultDto FromRootBranch(IVault vault)
        {
            var root = XmlBranchDto.FromBranch(vault.Root ?? new Branch((VaultBase)vault, null, null));

            return(new XmlVaultDto {
                Root = root
            });
        }
Exemplo n.º 2
0
 public static XmlBranchDto FromBranch(IBranch branch)
 {
     return(new XmlBranchDto
     {
         Name = branch.Name,
         Metadata = ((Branch)branch).Metadata.Raw,
         Values = ((Branch)branch).GetValues(ValueKind.RegularAndInternal).Select(v => XmlValueDto.FromValue(v)).ToArray(),
         Branches = branch.GetBranches().Select(b => XmlBranchDto.FromBranch(b)).ToArray(),
     });
 }