Пример #1
0
Файл: Api.cs Проект: wyk125/AElf
 public static void SetSmartContractContext(ISmartContractContext contractContext)
 {
     _smartContractContext = contractContext;
     _dataProviders        = new Dictionary <string, IDataProvider> {
         { "", _smartContractContext.DataProvider }
     };
 }
Пример #2
0
        public IExecutive SetSmartContractContext(ISmartContractContext smartContractContext)
        {
            if (_setSmartContractContextHandler == null)
            {
                throw new InvalidOperationException("Api type is not set yet.");
            }

            _setSmartContractContextHandler(smartContractContext);
            _currentSmartContractContext = smartContractContext;
            return(this);
        }