Top "Custom-attributes" questions

In .NET Framework, custom attributes are user defined attributes which enable providing metadata for application elements such as assemblies, classes and methods.

Using action parameters in custom Authorization Attribute in ASP.NET MVC3

I have a controller which should only request authorization when loaded with specific parameters. Like when the parameter ID is 8 …

asp.net-mvc-3 authorization custom-attributes
How to plug method parameters into custom attribute

I have a custom Attribute called AuthoriseAttribute whose constructor looks like this: public AuthoriseAttribute(int userId) { .. blah } This is used …

c# custom-attributes
Custom attributes in Android fragments

I'd like to define custom attributes in Android fragment using XML (without using bundle additional parameters) like declare-styleable in custom …

android android-fragments custom-attributes fragment
How to define named Parameters C#

This seems like a simple question, but for some reason I can't find the answer anywhere. Basically, I'd like to …

c# .net custom-attributes named-parameters
Adding name attribute to `User` in Devise

I'm trying to add a name attribute to the User model provided by Devise. I added a "name" column to …

ruby-on-rails attributes devise custom-attributes
WCF service attribute to log method calls and exceptions

I have a requirement to log each method call in a WCF service, and any exceptions thrown. This has led …

c# wcf logging custom-attributes aop
Adding custom attributes to an asp:CheckBox control

I am trying to add a custom data-required attribute to an asp Checkbox control, it works fine for all other …

asp.net custom-attributes html
get all types in assembly with custom attribute

Is there an elegant way to get all the types in an assembly that have a custom attribute? So if …

c# reflection custom-attributes
Custom Attributes in Android

I'm trying to create a custom attribute called Tag for all editable elements. I added the following to attrs.xml &…

android custom-attributes
What's the difference between implementing FilterAttribute, IActionFilter and inheriting from ActionFilterAttribute in asp.net mvc 3?

I see that in one situation we can override OnActionExecuting or OnActionExecuted methods inheriting from ActionFilterAttribute class like this: public …

asp.net asp.net-mvc-3 filter attributes custom-attributes