コード例 #1
0
        public void Dispose()
        {
            if (_isDisposed)
            {
                return;
            }

            _isDisposed = true;

            CallOrHttpContextStorage.RemoveValue(ScopeKey);
        }
コード例 #2
0
        public static DomainEventScope Start()
        {
            var scope = Instance;

            if (scope != null)
            {
                throw new InvalidOperationException("A scope may not be started if one already exists");
            }

            scope = new DomainEventScope();

            CallOrHttpContextStorage.SetValue(ScopeKey, scope);

            return(scope);
        }