示例#1
0
        public async Task Set(MetadataRecord record, CancellationToken token = default)
        {
            record.VerifyNotNull(nameof(record));

            IMetadataRecordActor actor = _actorHost !.GetActor <IMetadataRecordActor>((ActorKey)record.Id);
            await actor.Set(record, token);
        }
示例#2
0
        public async Task Set(MetadataRecord metadataRecord)
        {
            metadataRecord.VerifyNotNull(nameof(metadataRecord));

            HttpResponseMessage response = await _httpClient.PostAsJsonAsync("api/metadata", metadataRecord);

            response.EnsureSuccessStatusCode();
        }
示例#3
0
        public async Task Set(MetadataRecord metadataRecord, CancellationToken token = default)
        {
            _logger.LogTrace($"{nameof(Set)}: Id={metadataRecord.Id}");

            metadataRecord
            .VerifyNotNull(nameof(metadataRecord))
            .Prepare();

            await _httpClient.PostAsJsonAsync("api/metadata", metadataRecord, token);
        }
示例#4
0
        public async Task Set(MetadataRecord record, CancellationToken token)
        {
            record
            .VerifyNotNull(nameof(record))
            .VerifyAssert(x => x.Id == base.ActorKey.Value, "Id mismatch");

            _logger.LogTrace($"{nameof(Set)}: Writing {record}");
            await _container.Set(record, token);

            _recordCache.Set(record);
        }
示例#5
0
        private void OnRowSelect(MetadataRecord metadataRecord)
        {
            metadataRecord.VerifyNotNull(nameof(metadataRecord));

            NavigationManager.NavigateTo(NavigationHelper.Metadata.EditMetadataPage(metadataRecord.Id));
        }