Пример #1
0
 internal static Account ParseAccount(Bosh.Change item,
                                      byte[] encryptionKey,
                                      IReadOnlyDictionary <string, string> folders)
 {
     var(version, blob) = DecodeItem(item);
     return(version switch
     {
         Version8 => ParseAccountVersion8(blob, encryptionKey, folders),
         Version9 => ParseAccountVersion9(blob, encryptionKey, folders),
         Version92 => ParseAccountVersion92(blob, encryptionKey, folders),
         _ => throw new UnsupportedFeatureException($"Database item version {version} is not supported")
     });
Пример #2
0
 internal static Bosh.Change MergeItems(Bosh.Change oldItem, Bosh.Change newItem)
 {
     // TODO: Merge two records! This is really tricky, so we just take the new one run with it.
     return(newItem);
 }