Files
dotnet-bot adf899c629 Adding System.Data..., System.ServiceModel..., and System.Web...
Adding reference source for
System.Data
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Entity.Design
System.Data.Linq
System.Data.SqlXml
System.ServiceModel
System.ServiceModel.Activation
System.ServiceModel.Activities
System.ServiceModel.Channels
System.ServiceModel.Discovery
System.ServiceModel.Internals
System.ServiceModel.Routing
System.ServiceModel.WasHosting
System.ServiceModel.Web
System.Web
System.Web.ApplicationServices
System.Web.DynamicData
System.Web.Entity
System.Web.Entity.Design
System.Web.Extensions
System.Web.Mobile
System.Web.Routing
System.Web.Services
System.Xml
System.Xml.Linq
2016-05-03 00:07:37 +02:00

71 lines
1.9 KiB
C#

//------------------------------------------------------------------------------
// <copyright file="WebBrowsableAttribute.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
using System.ComponentModel;
/// <devdoc>
/// </devdoc>
[AttributeUsage(AttributeTargets.Property)]
public sealed class WebBrowsableAttribute : Attribute {
/// <devdoc>
/// </devdoc>
public static readonly WebBrowsableAttribute Yes = new WebBrowsableAttribute(true);
/// <devdoc>
/// </devdoc>
public static readonly WebBrowsableAttribute No = new WebBrowsableAttribute(false);
/// <devdoc>
/// </devdoc>
public static readonly WebBrowsableAttribute Default = No;
private bool _browsable;
/// <devdoc>
/// </devdoc>
public WebBrowsableAttribute() : this(true) {
}
/// <devdoc>
/// </devdoc>
public WebBrowsableAttribute(bool browsable) {
_browsable = browsable;
}
/// <devdoc>
/// </devdoc>
public bool Browsable {
get {
return _browsable;
}
}
/// <internalonly/>
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
WebBrowsableAttribute other = obj as WebBrowsableAttribute;
return (other != null) && (other.Browsable == Browsable);
}
/// <internalonly/>
public override int GetHashCode() {
return _browsable.GetHashCode();
}
/// <internalonly/>
public override bool IsDefaultAttribute() {
return this.Equals(Default);
}
}
}