本文整理汇总了C#中GlobalFilterCollection类的典型用法代码示例。如果您正苦于以下问题:C# GlobalFilterCollection类的具体用法?C# GlobalFilterCollection怎么用?C# GlobalFilterCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GlobalFilterCollection类属于命名空间,在下文中一共展示了GlobalFilterCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
// global claims authorize filter
filters.Add(new ClaimsAuthorizeAttribute());
}
示例2: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
var errAttribute = new HandleErrorAttribute();
errAttribute.View = "~/Views/Shared/Error.cshtml";
filters.Add(errAttribute);
}
示例3: RegisterGlobalFilters
private static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
Guard.That(() => filters).IsNotNull();
filters.Add(new HandleErrorAttribute());
}
示例4: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
if (filters == null)
throw new ArgumentNullException("filters");
filters.Add(new HandleErrorAttribute());
}
示例5: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
// uncomment next two lines to force login and for https use
//filters.Add(new AuthorizeAndTransferAttribute());
//filters.Add(new RequireHttpsExceptLocalhostAttribute());
filters.Add(new HandleErrorAttribute());
}
示例6: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
filters.Add(new AuthorizeAttribute());
//filters.Add(new CheckSessionOutAttribute());
//filters.Add(new EmplSessionExpireFilterAttribute());
}
示例7: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
#if !DEBUG
filters.Add(new RequireHttpsAttribute());
#endif
}
示例8: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
if (filters != null)
{
filters.Add(new HandleErrorAttribute());
}
}
示例9: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
//do not register HandleErrorAttribute. use classic error handling mode
//filters.Add(new HandleErrorAttribute());
// register ELMAH
filters.Add(new HandleErrorWithELMAHAttribute());
}
示例10: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
var eventPublisher = EngineContext.Current.Resolve<IEventPublisher>();
eventPublisher.Publish(new AppRegisterGlobalFiltersEvent {
Filters = filters
});
}
示例11: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new AuthorizeAttribute());
filters.Add(new HandleErrorAttribute());
filters.Add(new NoCacheFilter());
filters.Add(new LoginValidate());
}
示例12: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
//filters.Add(new HandleErrorAttribute());
//OPTION 1
filters.Add(new BugGuardianFilter());
}
示例13: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new VerboseActionFilterAttribute());
filters.Add(new VerboseAuthorizationFilterAttribute());
filters.Add(new VerboseExceptionFilterAttribute());
filters.Add(new VerboseResultFilterAttribute());
}
示例14: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
// Change order and refresh the page, check what is type name displaying
filters.Add(new EntityNotFoundExceptionFilterAttribute() { Order = 1 });
filters.Add(new InvalidParametersExceptionFilterAttribute() { Order = 2 });
}
示例15: RegisterGlobalFilters
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
filters.Add(new InitializeSimpleMembershipAttribute());
filters.Add(new AllowCrossSiteJsonAttribute());
filters.Add(new ExceptionFilterAttribute());
}