public PresenterBinderWrapper(PresenterBinder presenterBinder) { if(presenterBinder == null) throw new ArgumentNullException("presenterBinder"); this._presenterBinder = presenterBinder; }
/// <summary /> public void ProcessRequest(HttpContext context) { var presenterBinder = new PresenterBinder(this, context); presenterBinder.PerformBinding(); OnLoad(); presenterBinder.Release(); }
/// <summary /> protected MvpWebService(bool throwExceptionIfNoPresenterBound) { this.throwExceptionIfNoPresenterBound = throwExceptionIfNoPresenterBound; presenterBinder = new PresenterBinder(this, HttpContext.Current); presenterBinder.PerformBinding(); }
public static PresenterBinderWrapper FromPresenterBinder(PresenterBinder presenterBinder) { return presenterBinder; }
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); }