Exemple #1
0
        public Task SetStore(StoreContent store, DigitalSignature digitalSignature, CancellationToken token)
        {
            this.Check();

            lock (_lockObject)
            {
                return(_messageManager.Upload(store, digitalSignature, token));
            }
        }
Exemple #2
0
        public Task SetStore(StoreContent store, DigitalSignature digitalSignature, CancellationToken token)
        {
            this.Check();

            lock (_lockObject)
            {
                return(Task.Run(() =>
                {
                    this.Action(AmoebaFunctionType.SetStore, (store, digitalSignature), token);
                }));
            }
        }
Exemple #3
0
        public Task Upload(StoreContent store, DigitalSignature digitalSignature, CancellationToken token)
        {
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }
            if (digitalSignature == null)
            {
                throw new ArgumentNullException(nameof(digitalSignature));
            }

            return(_coreManager.VolatileSetStream(ContentConverter.ToStream(store, 0), TimeSpan.FromDays(360), token)
                   .ContinueWith(task =>
            {
                _coreManager.UploadMetadata(new BroadcastClue("Store", DateTime.UtcNow, task.Result, digitalSignature));
            }));
        }