Files
mono/mcs/class/System/System.ComponentModel/EditorBrowsableAttribute.cs
T
Andreas N 93fa12d0d5 2003-07-02 Andreas Nahr <[email protected]>
* ISite.cs: Fixed attributes, fixed header
	* ITypeDescriptorContext.cs: Fixed attributes, formatting corrections
	* WarningException.cs: Fixed attributes, formatting corrections
	* AttributeCollection.cs: Fixed attributes
	* DesignerSerializationVisibility.cs: Fixed attributes
	* TypeConverter.cs: Fixed attributes

	* MarshalByValueComponent.cs:
	* IComponent.cs: Fixed attributes, supports .Net 1.0 and 1.1

	* DescriptionAttribute.cs:
	* DesignerCategoryAttribute.cs:
	* DoubleConverter.cs:
	* EditorBrowsableAttribute.cs:
	* EventDescriptorCollection.cs:
	* PropertyChangedEventHandler.cs:
	* RefreshEventArgs.cs:
	* StringConverter.cs:
	* DefaultValueAttribute.cs: Reformatted following style guidelines

	* License.cs: Removed unused MonoTODOs
	* LicenseContext.cs: Implemented
	* LicenseException.cs: Implemented
	* LicenseProvider.cs: Removed unused MonoTODOs and unneccesary Finalizer
	* LicenseUsageMode.cs: Fixed enum
	* RefreshProperties.cs: Fixed enum
	* LicFileLicenseProvider.cs: Implementation added
	* ExtenderProvidedPropertyAttribute.cs: Implementation added, formatting corrections
	* ExpandableObjectConverter.cs: Implemented
	* ComponentConverter.cs: Implemented

svn path=/trunk/mcs/; revision=15865
2003-07-02 14:51:39 +00:00

55 lines
1.2 KiB
C#
Executable File

//
// System.ComponentModel.EditorBrowsableAttribute.cs
//
// Author:
// Andreas Nahr ([email protected])
//
// (C) 2003 Andreas Nahr
//
//
using System.ComponentModel;
namespace System.ComponentModel
{
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Delegate |
AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field |
AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Property |
AttributeTargets.Struct)]
public sealed class EditorBrowsableAttribute : Attribute
{
private EditorBrowsableState state;
public EditorBrowsableAttribute ()
{
this.state = EditorBrowsableState.Always;
}
public EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState state)
{
this.state = state;
}
public EditorBrowsableState State {
get {
return state;
}
}
public override bool Equals (object obj)
{
if (!(obj is EditorBrowsableAttribute))
return false;
if (obj == this)
return true;
return ((EditorBrowsableAttribute) obj).State == state;
}
public override int GetHashCode ()
{
return state.GetHashCode ();
}
}
}