Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / RecommendedAsConfigurableAttribute.cs / 1 / RecommendedAsConfigurableAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies that the property can be
/// used as an application setting.
///
[AttributeUsage(AttributeTargets.Property)]
[Obsolete("Use System.ComponentModel.SettingsBindableAttribute instead to work with the new settings model.")]
public class RecommendedAsConfigurableAttribute : Attribute {
private bool recommendedAsConfigurable = false;
///
///
/// Initializes a new instance of
/// the class.
///
///
public RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable) {
this.recommendedAsConfigurable = recommendedAsConfigurable;
}
///
/// Gets a value indicating whether the property this
/// attribute is bound to can be used as an application setting.
///
public bool RecommendedAsConfigurable {
get {
return recommendedAsConfigurable;
}
}
///
///
/// Specifies that a property cannot be used as an application setting. This
/// field is read-only.
///
///
public static readonly RecommendedAsConfigurableAttribute No = new RecommendedAsConfigurableAttribute(false);
///
///
/// Specifies
/// that a property can be used as an application setting. This field is read-only.
///
///
public static readonly RecommendedAsConfigurableAttribute Yes = new RecommendedAsConfigurableAttribute(true);
///
///
/// Specifies the default value for the , which is . This field is
/// read-only.
///
///
public static readonly RecommendedAsConfigurableAttribute Default = No;
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
RecommendedAsConfigurableAttribute other = obj as RecommendedAsConfigurableAttribute;
return other != null && other.RecommendedAsConfigurable == recommendedAsConfigurable;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
public override bool IsDefaultAttribute() {
return !recommendedAsConfigurable;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TransformerInfo.cs
- ConcurrencyMode.cs
- SqlDataSourceCache.cs
- XmlCustomFormatter.cs
- DataRecord.cs
- DbModificationCommandTree.cs
- DataGridViewCellConverter.cs
- WindowsUpDown.cs
- DataGridClipboardCellContent.cs
- DataGridTemplateColumn.cs
- ImageCollectionCodeDomSerializer.cs
- IndentedWriter.cs
- RestHandler.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ExpressionLink.cs
- xdrvalidator.cs
- WindowProviderWrapper.cs
- StylusDevice.cs
- DataGridViewSortCompareEventArgs.cs
- WebPartDisplayMode.cs
- Debug.cs
- TCPListener.cs
- CaseExpr.cs
- ProxyWebPartManager.cs
- TextRangeProviderWrapper.cs
- FreeFormPanel.cs
- ValidationErrorInfo.cs
- NCryptNative.cs
- ScriptControlManager.cs
- TakeQueryOptionExpression.cs
- GenericTextProperties.cs
- ReverseInheritProperty.cs
- DataGridCellClipboardEventArgs.cs
- SystemIPGlobalProperties.cs
- RelatedCurrencyManager.cs
- XmlElement.cs
- TextBoxBase.cs
- MenuItemCollection.cs
- XmlWriterTraceListener.cs
- XmlSchema.cs
- AttributeSetAction.cs
- PointConverter.cs
- ColorTransformHelper.cs
- SourceFileInfo.cs
- ReservationCollection.cs
- BackStopAuthenticationModule.cs
- ToolStripComboBox.cs
- UserNameSecurityTokenAuthenticator.cs
- FormViewDeletedEventArgs.cs
- TimeIntervalCollection.cs
- CssTextWriter.cs
- Types.cs
- TextTabProperties.cs
- ComplexBindingPropertiesAttribute.cs
- IISUnsafeMethods.cs
- FormsAuthenticationUser.cs
- Token.cs
- EmbeddedMailObjectsCollection.cs
- ForeignKeyConstraint.cs
- SimpleRecyclingCache.cs
- arabicshape.cs
- WindowsSecurityToken.cs
- SchemaRegistration.cs
- XmlSchemaImporter.cs
- HelpExampleGenerator.cs
- MethodToken.cs
- XmlSchemaAnnotated.cs
- _CommandStream.cs
- InlineUIContainer.cs
- TextStore.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TreeViewBindingsEditor.cs
- Signature.cs
- Vector3DAnimation.cs
- ProtocolsConfigurationHandler.cs
- LineGeometry.cs
- RijndaelManagedTransform.cs
- IOThreadTimer.cs
- EventLogPermissionEntry.cs
- HMACSHA384.cs
- ContentAlignmentEditor.cs
- SqlDataSource.cs
- AttachmentService.cs
- ProgramNode.cs
- RuntimeIdentifierPropertyAttribute.cs
- ObjectViewListener.cs
- PrinterResolution.cs
- MessageQueueInstaller.cs
- ParentQuery.cs
- TabItem.cs
- WriteLineDesigner.xaml.cs
- BamlMapTable.cs
- XmlElementCollection.cs
- LexicalChunk.cs
- LinkConverter.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- UTF32Encoding.cs
- SessionStateItemCollection.cs
- UnionQueryOperator.cs
- AlgoModule.cs