예제 #1
0
        public async Task <IEnumerable <FileDescriptor> > GetFileDescriptorsAsync(IChainContext chainContext, Address address)
        {
            IExecutive executive = null;

            IEnumerable <FileDescriptor> output;

            try
            {
                executive = await _smartContractExecutiveService.GetHistoryExecutiveAsync(
                    chainContext, address);

                output = executive.GetFileDescriptors();
            }
            finally
            {
                if (executive != null)
                {
                    await _smartContractExecutiveService.PutExecutiveAsync(address, executive);
                }
            }

            return(output);
        }