コード例 #1
0
        public PresenterBinderWrapper(PresenterBinder presenterBinder)
        {
            if(presenterBinder == null)
                throw new ArgumentNullException("presenterBinder");

            this._presenterBinder = presenterBinder;
        }
コード例 #2
0
        /// <summary />
        public void ProcessRequest(HttpContext context)
        {
            var presenterBinder = new PresenterBinder(this, context);
            presenterBinder.PerformBinding();

            OnLoad();

            presenterBinder.Release();
        }
コード例 #3
0
 /// <summary />
 protected MvpWebService(bool throwExceptionIfNoPresenterBound)
 {
     this.throwExceptionIfNoPresenterBound = throwExceptionIfNoPresenterBound;
     presenterBinder = new PresenterBinder(this, HttpContext.Current);
     presenterBinder.PerformBinding();
 }
コード例 #4
0
 public static PresenterBinderWrapper FromPresenterBinder(PresenterBinder presenterBinder)
 {
     return presenterBinder;
 }
コード例 #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);
        }