コード例 #1
0
        public async Task <ResultWrapper <bool> > ndm_changeDataAssetState(Keccak assetId, string state)
        {
            if (!Enum.TryParse <DataAssetState>(state, true, out var dataAssetState))
            {
                return(ResultWrapper <bool> .Fail($"Invalid state: '{state}'."));
            }

            var changed = await _providerService.ChangeDataAssetStateAsync(assetId, dataAssetState);

            return(ResultWrapper <bool> .Success(changed));
        }