Пример #1
0
        public Database(UserRepository userStorage, IEnumerable <FrontendBase> frontends)
        {
            if (userStorage == null)
            {
                throw new ArgumentNullException("userStorage");
            }
            if (frontends == null)
            {
                throw new ArgumentNullException("frontends");
            }
            this.userStorage = userStorage;
            this.frontends   = new SortedDictionary <string, FrontendBase> ();
            DataContext dc = new NullDataContext();

            foreach (var f in frontends)
            {
                if (f == null)
                {
                    throw new ArgumentException("Has at least one null item", "frontends");
                }
                this.frontends.Add(f.Name, f);
                frontendInstances.Add(f.GetInstanse(dc));
            }
            encryptedStorageManager = new EncryptedStorageManager(userStorage);
        }
Пример #2
0
 public abstract void Serialize(Stream stream, EncryptedStorageManager encryptedStorageManager);