Skip to content

Instantly share code, notes, and snippets.

@Grinderofl
Created October 27, 2011 09:13
Show Gist options
  • Save Grinderofl/1319123 to your computer and use it in GitHub Desktop.
Save Grinderofl/1319123 to your computer and use it in GitHub Desktop.
C# .NET: Allow Anonymous Attribute
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AllowAnonymousAttribute.cs" company="">
// Nero Sule
// </copyright>
// <summary>
// Extra attribute to allow making all methods apart from those tagged "AllowAnonymous" to be requiring authorization
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Web.Filters
{
using System;
/// <summary>
/// Extra attribute to allow making all methods apart from those tagged "AllowAnonymous" to be requiring authorization
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class AllowAnonymousAttribute : Attribute
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment