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


C# GlobalFilterCollection.Add方法代码示例

本文整理汇总了C#中GlobalFilterCollection.Add方法的典型用法代码示例。如果您正苦于以下问题:C# GlobalFilterCollection.Add方法的具体用法?C# GlobalFilterCollection.Add怎么用?C# GlobalFilterCollection.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlobalFilterCollection的用法示例。


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

示例1: RegisterGlobalFilters

        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new ExceptionFilter());
            filters.Add(new ValidateInputAttribute(false));

            filters.Add(new LoginFitler());
        }
开发者ID:the404,项目名称:bigline,代码行数:7,代码来源:FilterConfig.cs

示例2: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute());
     #if !DEBUG
     filters.Add(new RequireHttpsAttribute());
     #endif
 }
开发者ID:swebgit,项目名称:know-thy-shelf,代码行数:7,代码来源:FilterConfig.cs

示例3: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute{Order=1});
     filters.Add(new HandleErrorAttribute{Order=2,ExceptionType=typeof(InvalidTokenException), View="Refresh"});
     filters.Add(new TokenExtractingFilter());
     filters.Add(new TokenPersistenceFilter());
 }
开发者ID:rabashani,项目名称:the-real-deal,代码行数:7,代码来源:Global.asax.cs

示例4: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute());
     filters.Add(new InitializeSimpleMembershipAttribute());
     filters.Add(new AllowCrossSiteJsonAttribute());
     filters.Add(new ExceptionFilterAttribute());
 }
开发者ID:the404,项目名称:xyz,代码行数:7,代码来源:FilterConfig.cs

示例5: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute());
     filters.Add(new AuthorizeAttribute());
     //filters.Add(new CheckSessionOutAttribute());
     //filters.Add(new EmplSessionExpireFilterAttribute());
 }
开发者ID:densem-2013,项目名称:ACSDining,代码行数:7,代码来源:FilterConfig.cs

示例6: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     // Lynicon install inserted these 2 lines
     filters.Add(new ProcessIncludesAttribute());
     filters.Add(new ProcessHtmlAttribute());
     filters.Add(new HandleErrorAttribute());
 }
开发者ID:jamesej,项目名称:lynicon,代码行数:7,代码来源:FilterConfig.cs

示例7: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute());
     #if !DEBUG
     filters.Add(new System.Web.Mvc.AuthorizeAttribute());
     #endif
 }
开发者ID:paak,项目名称:win-report,代码行数:7,代码来源:FilterConfig.cs

示例8: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new HandleErrorAttribute());
     filters.Add(new SettingsAuthorizeAttribute());
     filters.Add(new ExportModelStateToTempData());
     filters.Add(new RequestTimingFilter());
 }
开发者ID:simplyio,项目名称:snippet-box,代码行数:7,代码来源:Global.asax.cs

示例9: RegisterGlobalFilters

        /// <summary>
        /// Registers the global filters.
        /// </summary>
        /// <param name="filters">The filters.</param>
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            //required for FluentSecurity
            filters.Add(new HandleSecurityAttribute(), 0);
        }
开发者ID:XDevelopers,项目名称:EcommerceOld,代码行数:11,代码来源:Global.asax.cs

示例10: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new NoCacheFilterAttribute());
     filters.Add(new SingleLoginFilterAttribute());
     filters.Add(new FixModelFilterAttribute());
     filters.Add(new HandleErrorAttribute());
 }
开发者ID:kinsen,项目名称:LotteryVoteMVC,代码行数:7,代码来源:Global.asax.cs

示例11: RegisterGlobalFilters

        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            // for all requests
            filters.Add(new RequireHttpsAttribute());
        }
开发者ID:Konex,项目名称:asp.net-mvc,代码行数:7,代码来源:FilterConfig.cs

示例12: RegisterGlobalFilters

        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            var slackReport =
                new WebHookErrorReportFilter(
                    new WebHookOptions(ConfigurationManager.AppSettings["slack:webhookurl"])
                    {
                        ChannelName = ConfigurationManager.AppSettings["slack:channel"],
                        //UserName = ConfigurationManager.AppSettings["slack:username"],
                        //IconEmoji = ConfigurationManager.AppSettings["slack:iconEmoji"],
                        //AttachmentColor = ConfigurationManager.AppSettings["slack:color"],
                        //AttachmentTitle = ConfigurationManager.AppSettings["slack:title"],
                        //AttachmentTitleLink = ConfigurationManager.AppSettings["slack:link"],
                        //Text = ConfigurationManager.AppSettings["slack:text"],
                        //ExceptionTextFormat = ConfigurationManager.AppSettings["slack:exceptionTextFormat"],
                    }
            )
            {
                IgnoreHandled = true,
                IgnoreExceptionTypes = new[] { typeof(System.ApplicationException) },
            };
            filters.Add(slackReport, 1);

            //var slackReportEvented = new WebHookErrorReportFilter();
            //slackReportEvented.OnExceptionReporting += slackReportEvented_OnExceptionReporting;
            //filters.Add(slackReportEvented);
        }
开发者ID:peterlanoie,项目名称:aspnet-mvc-slack,代码行数:28,代码来源:FilterConfig.cs

示例13: RegisterGlobalFilters

        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            // this filter injects Notifications into the IBaseModel
            filters.Add(new AdminFilter());
        }
开发者ID:ppittle,项目名称:LBi.LostDoc,代码行数:7,代码来源:Global.asax.cs

示例14: RegisterGlobalFilters

        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            filters.Add(new AuthorizeAttribute());
            //filters.Add(new RequireHttpsAttribute());
        }
开发者ID:jbailey130,项目名称:blipship,代码行数:7,代码来源:FilterConfig.cs

示例15: RegisterGlobalFilters

 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
 {
     filters.Add(new AuthorizeAttribute());
     filters.Add(new HandleErrorAttribute());
     filters.Add(new NoCacheFilter());
     filters.Add(new LoginValidate());
 }
开发者ID:mrG7,项目名称:PTS,代码行数:7,代码来源:FilterConfig.cs


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