public PresenterBinderWrapper(PresenterBinder presenterBinder)
        {
            if(presenterBinder == null)
                throw new ArgumentNullException("presenterBinder");

            this._presenterBinder = presenterBinder;
        }
Exemplo n.º 2
0
        /// <summary />
        public void ProcessRequest(HttpContext context)
        {
            var presenterBinder = new PresenterBinder(this, context);
            presenterBinder.PerformBinding();

            OnLoad();

            presenterBinder.Release();
        }
Exemplo n.º 3
0
 /// <summary />
 protected MvpWebService(bool throwExceptionIfNoPresenterBound)
 {
     this.throwExceptionIfNoPresenterBound = throwExceptionIfNoPresenterBound;
     presenterBinder = new PresenterBinder(this, HttpContext.Current);
     presenterBinder.PerformBinding();
 }
 public static PresenterBinderWrapper FromPresenterBinder(PresenterBinder presenterBinder)
 {
     return presenterBinder;
 }
Exemplo n.º 5
0
        public void PresenterBinder_MessageCoordinator_ShouldReturnInstance()
        {
            // Arrange
            var host = new object();
            var httpContext = MockRepository.GenerateMock<HttpContextBase>();
            var traceContext = MockRepository.GenerateMock<ITraceContext>();

            // Act
            var binder = new PresenterBinder(new[] { host }, httpContext, traceContext);

            // Assert
            Assert.IsNotNull(binder.MessageCoordinator);
        }