• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IWebContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



IWebContext类属于命名空间,在下文中一共展示了IWebContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: TreeSorter

        public TreeSorter(IPersister persister, IEditManager editManager, IWebContext webContext, IVersionManager versionMaker)
		{
			this.persister = persister;
			this.editManager = editManager;
			this.webContext = webContext;
            this.versionMaker = versionMaker;
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:7,代码来源:TreeSorter.cs


示例14: ContentMessageSource

		public ContentMessageSource(IPersister persister, IIntegrityManager integrity, ISecurityManager security, IWebContext context)
		{
			this.persister = persister;
			this.integrity = integrity;
			this.security = security;
			this.context = context;
		}
开发者ID:EzyWebwerkstaden,项目名称:n2cms,代码行数:7,代码来源:ContentMessageSource.cs


示例15: LanguageInterceptor

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


示例16: ViewPageResult

 public ViewPageResult(ContentItem thePage, IControllerMapper controllerMapper, IWebContext webContext, IActionInvoker actionInvoker)
 {
     _thePage = thePage;
     _controllerMapper = controllerMapper;
     _webContext = webContext;
     _actionInvoker = actionInvoker;
 }
开发者ID:dpawatts,项目名称:zeus,代码行数:7,代码来源:ViewPageResult.cs


示例17: SessionProvider

 public SessionProvider(IConfigurationBuilder builder, IInterceptor interceptor, IWebContext webContext)
 {
     nhSessionFactory = builder.BuildSessionFactory();
     Debug.WriteLine("Built Session Factory " + DateTime.Now);
     this.webContext = webContext;
     this.interceptor = interceptor;
 }
开发者ID:arp51,项目名称:n2cms,代码行数:7,代码来源:SessionProvider.cs


示例18: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {

            _webContext = ObjectFactory.GetInstance<IWebContext>();
            this.Title = ConfigurationManager.AppSettings.Get("SiteName") + " - Kiem Tra Trac Nghiem";

            string webURL = _webContext.RootUrl; 
            string initParams = "webURL=" + webURL;
            if (Request.Params["levelID"] != null)
            {
                try
                {
                    int id = Commons.ConvertToInt(Request.QueryString["levelID"], 0);
                    if (id > 0)
                    {
                        string questionsNumber = "5";
                        string timeExpire = "10";

                        initParams += ",levelID=" + Request.QueryString["levelID"] + ",questionsNumber=" + questionsNumber + ",timeExpire=" + timeExpire;

                        this.Silverlight1.InitParameters = initParams;
                    }
                    else
                        Response.Redirect(webURL+"learning/defaults.aspx");
                }
                catch
                {
                    Response.Redirect(webURL + "learning/defaults.aspx");
                }
            }
            else
                Response.Redirect(webURL + "learning/defaults.aspx");
        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:33,代码来源:TestPage.aspx.cs


示例19: Before

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


示例20: StatisticsLogger

		public StatisticsLogger(EventBroker broker, IWebContext context, Collector collector, StatisticsRepository repository)
		{
			this.broker = broker;
			this.context = context;
			this.filler = collector;
			this.repository = repository;
		}
开发者ID:andyhebear,项目名称:n2cms,代码行数:7,代码来源:StatisticsLogger.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IWebDriver类代码示例发布时间:2022-05-24
下一篇:
C# IWebClient类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap