using Nethereum.ABI.FunctionEncoding.Attributes; using Nethereum.JsonRpc.Client; using Nethereum.RPC.Eth.DTOs; using Nethereum.RPC.Eth.Transactions; namespace Nethereum.Contracts.QueryHandlers { #if !DOTNET35 public class QueryToDTOHandler : QueryDecoderBaseHandler where TFunctionMessage : FunctionMessage, new() where TFunctionOutput: IFunctionOutputDTO, new() { public QueryToDTOHandler(IClient client, string defaultAddressFrom = null, BlockParameter defaultBlockParameter = null) : base(client, defaultAddressFrom, defaultBlockParameter) { QueryRawHandler = new QueryRawHandler(client, defaultAddressFrom, defaultBlockParameter); } public QueryToDTOHandler(IEthCall ethCall, string defaultAddressFrom = null, BlockParameter defaultBlockParameter = null) : base(ethCall, defaultAddressFrom, defaultBlockParameter) { QueryRawHandler = new QueryRawHandler(ethCall, defaultAddressFrom, defaultBlockParameter); } protected override TFunctionOutput DecodeOutput(string output) { return QueryRawHandler.FunctionMessageEncodingService.DecodeDTOTypeOutput(output); } } #endif }