Ejemplo n.º 1
0
        /// <summary>
        /// Constructs the new provider.
        /// </summary>
        public ObjectStorageProvider()
        {
            this.Index  = new ObjectIndex();
            this.Store  = new ObjectStorage(this.Index);
            this.Append = new AppendLogCache();

            // Get the external address
            var addr = Service.Providers
                       .Resolve <AddressProvider>()
                       .GetExternal();

            this.Address = Convert.ToBase64String(
                addr.GetAddressBytes()
                ).ToCharArray();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs the storage.
 /// </summary>
 /// <param name="index">The indexer to use</param>
 public ObjectStorage(ObjectIndex index)
 {
     this.Index = index;
     this.RenewCredentials();
     Timer.PeriodicCall(TimeSpan.FromMinutes(30), RenewCredentials);
 }