コード例 #1
0
        private ErrorCode WalletAddRecordHandler(int storage_handle, string type_, string id, IntPtr value,
                                                 int value_len, string tags_json)
        {
            try
            {
                var valueBytes = new byte[value_len];
                Marshal.Copy(value, valueBytes, 0, value_len);

                _storage.AddRecordAsync(storage_handle, type_, id, valueBytes, tags_json).GetAwaiter().GetResult();
                return(ErrorCode.Success);
            }
            catch
            {
                return(ErrorCode.WalletStorageError);
            }
        }