//
-// System.Web.UI.WebControls.CommandEventArgs.cs
+// System.Web.UI.WebControls.DataBindingHandlerAttribute class
//
// Author: Duncan Mak (duncan@novell.com)
//
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Security.Permissions;
+
namespace System.Web.UI {
+ // CAS - no InheritanceDemand here as the class is sealed
+ [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[AttributeUsage (AttributeTargets.Class)]
public sealed class DataBindingHandlerAttribute : Attribute
{
public DataBindingHandlerAttribute (string name)
{
- this.name = name;
+ this.name = (name != null) ? name : String.Empty;
}
public DataBindingHandlerAttribute (Type type)
public static readonly DataBindingHandlerAttribute Default;
+ public override bool Equals (object obj)
+ {
+ DataBindingHandlerAttribute other = obj as DataBindingHandlerAttribute;
+ if (other == null) {
+ return false;
+ }
+
+ return HandlerTypeName.Equals (other.HandlerTypeName);
+ }
+
+ public override int GetHashCode ()
+ {
+ return HandlerTypeName.GetHashCode ();
+ }
+
public string HandlerTypeName {
get { return name; }
}