public Task SetProfile(ProfileContent profile, DigitalSignature digitalSignature, CancellationToken token) { this.Check(); lock (_lockObject) { return(_messageManager.Upload(profile, digitalSignature, token)); } }
public Task SetProfile(ProfileContent profile, DigitalSignature digitalSignature, CancellationToken token) { this.Check(); lock (_lockObject) { return(Task.Run(() => { this.Action(AmoebaFunctionType.SetProfile, (profile, digitalSignature), token); })); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Map) { { ProfileAttributes = new Dictionary <ProfileAttribute, ProfileContent>(); TMap _map13 = iprot.ReadMapBegin(); for (int _i14 = 0; _i14 < _map13.Count; ++_i14) { ProfileAttribute _key15; ProfileContent _val16; _key15 = (ProfileAttribute)iprot.ReadI32(); _val16 = new ProfileContent(); _val16.Read(iprot); ProfileAttributes[_key15] = _val16; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public Task Upload(ProfileContent profile, DigitalSignature digitalSignature, CancellationToken token) { if (profile == null) { throw new ArgumentNullException(nameof(profile)); } if (digitalSignature == null) { throw new ArgumentNullException(nameof(digitalSignature)); } return(_coreManager.VolatileSetStream(ContentConverter.ToStream(profile, 0), TimeSpan.FromDays(360), token) .ContinueWith(task => { _coreManager.UploadMetadata(new BroadcastClue("Profile", DateTime.UtcNow, task.Result, digitalSignature)); })); }