Esempio n. 1
0
        public EsentDataStorage(string baseDirectory, string name, Func <TValue, byte[]> encoder, Func <UInt256, byte[], TValue> decoder)
        {
            this.name      = name;
            this.directory = Path.Combine(baseDirectory, name);
            this.dict      = new PersistentByteDictionary(this.directory);

            this.encoder = encoder;
            this.decoder = decoder;
        }
Esempio n. 2
0
 public NetworkPeerStorage()
 {
     this.name      = "KnownAddresses";
     this.directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "BitSharp", "Peers", this.name);
     this.dict      = new PersistentByteDictionary(this.directory);
 }
Esempio n. 3
0
 public NetworkPeerStorage(string baseDirectory, RulesEnum rulesType)
 {
     this.name      = "KnownAddresses";
     this.directory = Path.Combine(baseDirectory, this.name);
     this.dict      = new PersistentByteDictionary(this.directory);
 }