public MasterPresenter(IMasterView masterView = null) { this.masterView = masterView; db = new PortalAukcyjnyEntities(); if (IsUserLoggedIn()) { currentUserId = GetCurrentUserId(); } else { currentUserId = Guid.Empty; } currencyRepo = new CurrencyExchangeRepository(db); auctionsRepo = new AuctionsRepository(db); catRepo = new CategoriesRepository(db); offersRepo = new OffersRepository(db); usersRepo = new UsersRepository(db); commentsRepo = new CommentsRepository(db); observersRepo = new ObserversRepository(db); shipmentsRepo = new ShipmentsRepository(db); imagesRepo = new ImagesRepository(db); buyedItemsRepo = new BuyedItemsRepository(db); }
void IContentView.InitializeMaster(IMasterView master) { if (MasterView != null) { throw new InvalidOperationException("不能重复初始化母板"); } MasterView = master; }
public MasterPresenter(IMasterView view) { MasterView = view; World = new World(); }
IHtmlRenderAdapter IContentView.CreateContentAdapter( IMasterView master ) { return new ContentAdapter( this ); }
void IContentView.InitializeMaster( IMasterView master ) { if ( MasterView != null ) throw new InvalidOperationException( "不能重复初始化母板" ); MasterView = master; }
IHtmlRenderAdapter IContentView.CreateContentAdapter(IMasterView master) { return(new ContentAdapter(this)); }