当前位置: 首页>>代码示例>>C#>>正文


C# IWebContext类代码示例

本文整理汇总了C#中IWebContext的典型用法代码示例。如果您正苦于以下问题:C# IWebContext类的具体用法?C# IWebContext怎么用?C# IWebContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IWebContext类属于命名空间,在下文中一共展示了IWebContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CachingUrlParserDecorator

 public CachingUrlParserDecorator(IUrlParser inner, IPersister persister, IWebContext webContext, CacheWrapper cache)
 {
     this.inner = inner;
     this.persister = persister;
     this.webContext = webContext;
     this.cache = cache;
 }
开发者ID:GrimaceOfDespair,项目名称:n2cms,代码行数:7,代码来源:CachingUrlParserDecorator.cs

示例2: XmlInstallationManager

		public XmlInstallationManager(IHost host, IPersister persister, XmlContentRepository repository, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator)
            : base(connectionContext, importer, webContext, persister, activator)
        {
            this.host = host;
            this.persister = persister;
			this.repository = repository;
        }
开发者ID:Biswo,项目名称:n2cms,代码行数:7,代码来源:XmlInstallationManager.cs

示例3: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _presenter = new EditPhotosPresenter();
     _presenter.Init(this);
 }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:EditPhotos.aspx.cs

示例4: MyBlogsPresenter

 public MyBlogsPresenter()
 {
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _blogRepository = ObjectFactory.GetInstance<IBlogRepository>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:MyBlogsPresenter.cs

示例5: SearchConfigurationBuilderParticipator

 public SearchConfigurationBuilderParticipator(IWebContext webContext, DatabaseSection config)
 {
     this.webContext = webContext;
     searchEnabled = config.Search.Enabled;
     asyncIndexing = config.Search.AsyncIndexing;
     indexPath = config.Search.IndexPath;
 }
开发者ID:joaohortencio,项目名称:n2cms,代码行数:7,代码来源:SearchConfigurationBuilderParticipator.cs

示例6: Init

        public void Init(IInviteFriends view)
        {
            _view = view;
            //_userSession = ObjectFactory.GetInstance<IUserSession>();
            //_email = ObjectFactory.GetInstance<IEmail>();
            //_friendInvitationRepository = ObjectFactory.GetInstance<IFriendInvitationRepository>();
            //_accountRepository = ObjectFactory.GetInstance<IAccountRepository>();
            //_webContext = ObjectFactory.GetInstance<IWebContext>();
            _userSession = new SPKTCore.Core.Impl.UserSession();
            _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
            _email = new SPKTCore.Core.Impl.Email();
            _webContext = new SPKTCore.Core.Impl.WebContext();
            if (_userSession.LoggedIn)
            {
                _account = _userSession.CurrentUser;
                _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
                if (_account != null)
                {
                    _view.DisplayToData(_account.UserName + " &lt;" + _account.Email + "&gt;");

                    if (_webContext.AccoundIdToInvite > 0)
                    {
                        _accountToInvite = _accountRepository.GetAccountByID(_webContext.AccoundIdToInvite);

                        if (_accountToInvite != null)
                        {
                            SendInvitation(_accountToInvite.Email,
                                           _account.UserName + " " + _account.UserName + " ");
                            _view.ShowMessage(_accountToInvite.UserName + " Đã được gửi đi!");
                            _view.TogglePnlInvite(false);
                        }
                    }
                }
            }
        }
开发者ID:SPKT,项目名称:MHX2,代码行数:35,代码来源:InviteFriend.cs

示例7: ProfilePresenter

        public ProfilePresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            _account = _userSession.CurrentUser;

            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
            {
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_webContext.AccountID);
            }
            else
            {
                _accountBeingViewed = _userSession.CurrentUser;
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            }
            if (_accountBeingViewed == null)
                _redirector.GoToAccountLoginPage();
            if (_accountBeingViewed.Profile != null && _accountBeingViewed.Profile.ProfileID > 0)
                _privacyFlags = PrivacyFlag.GetPrivacyFlagsByProfileID(_accountBeingViewed.Profile.ProfileID);
            else
                _redirector.GoToHomePage();

        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:31,代码来源:ProfilePresenter.cs

示例8: Before

		public void Before (IWebContext webContext)
		{
			if( !HasExtension(webContext) &&
			    !HasRoute(webContext) ||
                IsDefault(webContext))
				webContext.RewritePath("/index.html");
		}
开发者ID:sphair,项目名称:Bifrost,代码行数:7,代码来源:SinglePageApplication.cs

示例9: MongoInstallationManager

 public MongoInstallationManager(MongoDatabaseProvider database, IHost host, IPersister persister, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator)
     : base(connectionContext, importer, webContext, persister, activator)
 {
     this.database = database;
     this.host = host;
     this.persister = persister;
 }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:7,代码来源:MongoInstallationManager.cs

示例10: ConfirmFriendshipRequestPresenter

 public ConfirmFriendshipRequestPresenter()
 {
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _configuration = ObjectFactory.GetInstance<IConfiguration>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _friendService = ObjectFactory.GetInstance<IFriendService>();
 }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:ConfirmFriendshipRequestPresenter.cs

示例11: LanguageInterceptor

 public LanguageInterceptor(IPersister persister, IDefinitionManager definitions, IWebContext context, ILanguageGateway gateway)
 {
     this.persister = persister;
     this.definitions = definitions;
     this.context = context;
     this.gateway = gateway;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:7,代码来源:LanguageInterceptor.cs

示例12: Action

        /// <summary>
        /// Deconstructs the contexts request into a set of prameters for the context.
        /// </summary>
        /// <remarks>
        /// The deafult implementation uses the convention of `/area/concern/action.aspc/tail?querystring`
        /// </remarks>
        /// <param name="ev">The vent that was considered for this action.</param>
        /// <param name="context">The context to act upon.</param>
        public override void Action(IEvent ev, IWebContext context)
        {
            // eliminate the app directory from the path
            string path = _appDirectory.Length > 0 ? context.Request.UrlInfo.AppPath.Trim('/').Replace(_appDirectory, "") : context.Request.UrlInfo.AppPath;
            path = path.Trim('/');

            if (!String.IsNullOrEmpty(context.Request.UrlInfo.File)) {
                context.Params["action"] = context.Request.UrlInfo.File.Split('.')[0].ToLower();

                string[] parts = path.Split('/');
                if (parts.Length >= 2) {
                    context.Params["area"] = parts[parts.Length - 2].ToLower();
                    context.Params["concern"] = parts[parts.Length - 1].ToLower();
                } else if (parts.Length == 1) {
                    context.Params["area"] = parts[0];
                }
            }

            // import query string and form values
            context.Params.Import(context.Request.Params.Where(kv => !kv.Key.StartsWith("_")));
            // establish flags
            foreach (string flag in context.Request.Flags.Where(f => !f.StartsWith("_"))) {
                context.Flags.Add(flag);
            }
            context.Params.Import(context.Request.Headers);
            // note method and tail
            context.Params["method"] = context.Request.Method;
            context.Params["tail"] = context.Request.UrlInfo.Tail;
            string requestViews = String.Join(";", context.Request.UrlInfo.Tail.Split(new string[] {"/"}, StringSplitOptions.RemoveEmptyEntries));
            if (!String.IsNullOrEmpty(requestViews)) {
                context.Params["views"] = requestViews;
            }
        }
开发者ID:guy-murphy,项目名称:inversion-vnext-dev,代码行数:41,代码来源:ParseRequestBehaviour.cs

示例13: CommentsPresenter

 public CommentsPresenter()
 {
     _commentRepository = new CommentRepository();
     _webContext = new WebContext();
     _userSession = new UserSession();
     _alertService = new AlertService();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:CommentPresenter.cs

示例14: ReadMessagePresenter

 public ReadMessagePresenter()
 {
     _webContext = new WebContext();
     _userSession = new UserSession();
     _redirector = new Redirector();
     _messageRepository = new SPKTCore.Core.DataAccess.Impl.MessageRepository();
 }
开发者ID:ngocpq,项目名称:MHX2,代码行数:7,代码来源:ReadMessagePresenter.cs

示例15: NotifycationControlPresenter

 public NotifycationControlPresenter()
 {
     _webContext = new WebContext();
     _userSession = new UserSession();
     _redirector = new Redirector();
     _notifycationService = new NotificationService();
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:7,代码来源:NotifycationControlPresenter.cs


注:本文中的IWebContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。