コード例 #1
0
        public void ScopeHolderAndScopeContext_BeSameInstance(IEventScopeFactory factory, Type scopeType)
        {
            var scopeContext = factory.CreateScopeContext();
            var scopeHolder  = factory.CreateScopeHolder();

            scopeContext.Should().BeSameAs(scopeHolder);
        }
コード例 #2
0
        public PerTransactionScopeContextTest()
        {
            this.eventScope = A.Fake<IEventScopeInternal>();
            this.eventScopeFactory = A.Fake<IEventScopeFactory>();

            this.testee = new PerTransactionScopeContext(this.eventScopeFactory);
        }
コード例 #3
0
        public PerTransactionScopeContextTest()
        {
            this.eventScope        = A.Fake <IEventScopeInternal>();
            this.eventScopeFactory = A.Fake <IEventScopeFactory>();

            this.testee = new PerTransactionScopeContext(this.eventScopeFactory);
        }
コード例 #4
0
        public AbstractEventScopeContextTest()
        {
            this.eventScope        = A.Fake <IEventScopeInternal>();
            this.eventScopeFactory = A.Fake <IEventScopeFactory>();

            this.testee = new TestAbstractEventScopeContext(this.eventScopeFactory);
        }
コード例 #5
0
        public AbstractEventScopeContextTest()
        {
            this.eventScope = A.Fake<IEventScopeInternal>();
            this.eventScopeFactory = A.Fake<IEventScopeFactory>();

            this.testee = new TestAbstractEventScopeContext(this.eventScopeFactory);
        }
コード例 #6
0
 protected abstract IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory);
コード例 #7
0
 public PerThreadEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
     this.current = new ThreadLocal <IEventScopeInternal>();
 }
コード例 #8
0
 public PerTransactionScopeContext(IEventScopeFactory scopeFactory)
 {
     this.scopeFactory = scopeFactory;
     this.scopesToTransactionIdentifier = new ConcurrentDictionary <string, SinglePhaseScopeDecorator>();
 }
コード例 #9
0
 protected AbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
 {
     this.ScopeFactory = eventScopeFactory;
 }
コード例 #10
0
 public EventScopingStandardFactory(IEventScopeFactory eventScopeFactory)
 {
     this.eventScopeFactory = eventScopeFactory;
 }
コード例 #11
0
 public PerThreadEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
     this.current = new ThreadLocal<IEventScopeInternal>();
 }
コード例 #12
0
        public void CreateScopeContext_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType)
        {
            IEventScopeContext scopeContext = factory.CreateScopeContext();

            scopeContext.GetType().Should().Be(scopeType);
        }
コード例 #13
0
        public void CreateScopeHolder_CreatesScopeHolderOfType(IEventScopeFactory factory, Type scopeType)
        {
            IEventScopeHolder scopeHolder = factory.CreateScopeHolder();

            scopeHolder.GetType().Should().Be(scopeType);
        }
コード例 #14
0
        public void CreateHandlerDecorator_CreatesDefaultDecorator(IEventScopeFactory factory, Type scopeType)
        {
            IHandler decorator = factory.CreateHandlerDecorator(A.Fake <IHandler>());

            decorator.Should().BeOfType <ScopingHandlerDecorator>();
        }
コード例 #15
0
 public TestAbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
コード例 #16
0
 public PerCallEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
コード例 #17
0
 protected abstract IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory);
コード例 #18
0
 public ConnectionContext(IConnectionScopeFactory factory, IEventScopeFactory eventScopeFactory)
 {
     _factory           = factory;
     _eventScopeFactory = eventScopeFactory;
 }
コード例 #19
0
 public TestAbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }
コード例 #20
0
 protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory)
 {
     return(new PerCallEventScopeContext(eventScopeFactory));
 }
コード例 #21
0
        public void CreateScope_CreatesDefaultEventScope(IEventScopeFactory factory, Type scopeType)
        {
            IEventScope eventScope = factory.CreateScope();

            eventScope.Should().BeOfType <EventScope>();
        }
コード例 #22
0
 public PerTransactionScopeContext(IEventScopeFactory scopeFactory)
 {
     this.scopeFactory = scopeFactory;
     this.scopesToTransactionIdentifier = new ConcurrentDictionary<string, SinglePhaseScopeDecorator>();
 }
コード例 #23
0
 public EventScopingStandardFactory(IEventScopeFactory eventScopeFactory)
 {
     this.eventScopeFactory = eventScopeFactory;
 }
コード例 #24
0
 public ConnectionContext(IEventScopeFactory eventScopeFactory)
 {
     _eventScopeFactory = eventScopeFactory;
 }
コード例 #25
0
 protected override IEventScopeContextInternal CreateScope(IEventScopeFactory eventScopeFactory)
 {
     return new PerCallEventScopeContext(eventScopeFactory);
 }
コード例 #26
0
 protected AbstractEventScopeContext(IEventScopeFactory eventScopeFactory)
 {
     this.ScopeFactory = eventScopeFactory;
 }
コード例 #27
0
 public PerCallEventScopeContext(IEventScopeFactory eventScopeFactory)
     : base(eventScopeFactory)
 {
 }