//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies the default binding property for a component.
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultBindingPropertyAttribute : Attribute {
private readonly string name;
///
///
/// Initializes a new instance of
/// the class.
///
///
public DefaultBindingPropertyAttribute() {
this.name = null;
}
///
///
/// Initializes a new instance of
/// the class.
///
///
public DefaultBindingPropertyAttribute(string name) {
this.name = name;
}
///
///
/// Gets the name of the default binding property for the component this attribute is
/// bound to.
///
///
public string Name {
get {
return name;
}
}
///
///
/// Specifies the default value for the , which is . This
/// field is read-only.
///
///
public static readonly DefaultBindingPropertyAttribute Default = new DefaultBindingPropertyAttribute();
public override bool Equals(object obj) {
DefaultBindingPropertyAttribute other = obj as DefaultBindingPropertyAttribute;
return other != null && other.Name == name;
}
public override int GetHashCode() {
return base.GetHashCode();
}
}
}