public async Task TestUpdateRecordTagsWorks() { await NonSecrets.AddRecordAsync(wallet, type, id, value, tagsEmpty); await CheckRecordFieldAsync(wallet, type, id, "tags", tagsEmpty); await NonSecrets.UpdateRecordTagsAsync(wallet, type, id, tags); await CheckRecordFieldAsync(wallet, type, id, "tags", tags); }
/// <inheritdoc /> public virtual async Task UpdateAsync <T>(Wallet wallet, T record) where T : WalletRecord, new() { await NonSecrets.UpdateRecordValueAsync(wallet, record.GetTypeName(), record.GetId(), record.ToJson()); await NonSecrets.UpdateRecordTagsAsync(wallet, record.GetTypeName(), record.GetId(), record.Tags.ToJson()); }
public async Task updateRecordTag(string type, string id, string tagJson) { try { await NonSecrets.UpdateRecordTagsAsync(d_openWallet, type, id, tagJson); } catch (Exception e) { Console.WriteLine($"Error: {e.Message}"); } }
/// <inheritdoc /> public virtual async Task UpdateAsync(Wallet wallet, RecordBase record) { record.UpdatedAtUtc = DateTime.UtcNow; await NonSecrets.UpdateRecordValueAsync(wallet, record.TypeName, record.Id, record.ToJson(_jsonSettings)); await NonSecrets.UpdateRecordTagsAsync(wallet, record.TypeName, record.Id, record.Tags.ToJson(_jsonSettings)); }
/// <inheritdoc /> public virtual async Task UpdateAsync(Wallet wallet, RecordBase record) { SetUpdatedAtUtc(record); await NonSecrets.UpdateRecordValueAsync(wallet, record.TypeName, record.Id, Base64Encode(record.ToJson(_jsonSettings))); await NonSecrets.UpdateRecordTagsAsync(wallet, record.TypeName, record.Id, GetTags(record).ToJson(_jsonSettings)); }
public async Task testUpdateRecordTagsWorksForNotFoundRecord() { var ex = await Assert.ThrowsExceptionAsync <WalletItemNotFoundException>(() => NonSecrets.UpdateRecordTagsAsync(wallet, type, id, tags) ); }