/// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DeleteAssetResponse response = new DeleteAssetResponse();


            return(response);
        }
예제 #2
0
        public static DeleteAssetResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DeleteAssetResponse deleteAssetResponse = new DeleteAssetResponse();

            deleteAssetResponse.HttpResponse = _ctx.HttpResponse;
            deleteAssetResponse.RequestId    = _ctx.StringValue("DeleteAsset.RequestId");

            return(deleteAssetResponse);
        }
        public async Task <Boolean> BurnAssetAsync(String hashId)
        {
            String queryStr = JsonConvert.SerializeObject(new { id = hashId });
            HttpResponseMessage httpResponse = await this.http.DeleteAsync(BlockchainConstants.BASE_URL + BlockchainConstants.ASSET + BlockchainConstants.QUERY + queryStr);

            DeleteAssetResponse deleteAssetResponse = await HttpHelper.DeserializeHttpResponse <DeleteAssetResponse>(httpResponse);

            return(deleteAssetResponse.Ok);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DeleteAssetResponse response = new DeleteAssetResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("assetStatus", targetDepth))
                {
                    var unmarshaller = AssetStatusUnmarshaller.Instance;
                    response.AssetStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }