public HandlingScope(Container container, HandlerIdentity identity) { Identity = identity; _container = container; _context = _container.GetInstance <DbContext>(); _handlingScopesStack = _container.GetInstance <IHandlingScopesStack <HandlingScope> >(); _parentScope = _handlingScopesStack.GetCurrentScope(); _handlingScopesStack.EnterScope(this); }
// private readonly TransactionScope _transaction; public HandlingScope(IDiContainerAccessor containerAccessor, HandlerIdentity identity) { Identity = identity; _containerAccessor = containerAccessor; _contextAccessor = _containerAccessor.GetInstance <IDbContextAccessor>(); _handlingScopesStack = _containerAccessor.GetInstance <IHandlingScopesStack <HandlingScope> >(); _parentScope = _handlingScopesStack.GetCurrentScope(); _handlingScopesStack.EnterScope(this); // _transaction = new TransactionScope(TransactionScopeOption.Required, // new TransactionOptions {IsolationLevel = IsolationLevel.Snapshot}); }
public HandlingScopesAnalyzer(IHandlingScopesStack <HandlingScope> scopesStack) { _scopesStack = scopesStack; }
public IdentitiesAssertion(IHandlingScopesStack <HandlingScope> scopesStack, IEnumerable <HandlerIdentity> identitiesToCheck) { _scopeIdentities = scopesStack.Select(s => s.Identity).Reverse().ToArray(); _identitiesToCheck = identitiesToCheck; }