Esempio n. 1
0
        public IDisposable Change(IWeChatPayOptions weChatPayOptions)
        {
            var parentScope = _weChatPayAsyncLocalAccessor.Current;

            _weChatPayAsyncLocalAccessor.Current = weChatPayOptions;
            return(new DisposeAction(() =>
            {
                _weChatPayAsyncLocalAccessor.Current = parentScope;
            }));
        }
        public WeChatPayAsyncLocal(IWeChatPayAsyncLocalAccessor weChatPayAsyncLocalAccessor)
        {
            _weChatPayAsyncLocalAccessor = weChatPayAsyncLocalAccessor;

            CurrentOptions = weChatPayAsyncLocalAccessor.Current;
        }