//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.Collections;
using System.ComponentModel;
///
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class NonVisualControlAttribute : Attribute {
///
///
///
///
public static readonly NonVisualControlAttribute NonVisual = new NonVisualControlAttribute(true);
///
///
///
///
public static readonly NonVisualControlAttribute Visual = new NonVisualControlAttribute(false);
///
///
///
///
public static readonly NonVisualControlAttribute Default = Visual;
private bool _nonVisual;
///
///
public NonVisualControlAttribute() : this(true) {
}
///
///
public NonVisualControlAttribute(bool nonVisual) {
_nonVisual = nonVisual;
}
///
/// Indicates if the control is non-visual.
///
public bool IsNonVisual {
get {
return _nonVisual;
}
}
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
NonVisualControlAttribute other = obj as NonVisualControlAttribute;
return (other != null) && (other.IsNonVisual == IsNonVisual);
}
///
public override int GetHashCode() {
return _nonVisual.GetHashCode();
}
///
public override bool IsDefaultAttribute() {
return this.Equals(Default);
}
}
}