Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / RecommendedAsConfigurableAttribute.cs / 1305376 / 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;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SpecialNameAttribute.cs
- Double.cs
- ResourcesBuildProvider.cs
- SqlRowUpdatingEvent.cs
- CopyNamespacesAction.cs
- PlainXmlDeserializer.cs
- arclist.cs
- EntityProviderFactory.cs
- XPathNodeHelper.cs
- XpsViewerException.cs
- CollaborationHelperFunctions.cs
- ToolboxItemAttribute.cs
- HtmlTextArea.cs
- PriorityChain.cs
- XPathNodeIterator.cs
- ipaddressinformationcollection.cs
- ExpressionVisitor.cs
- IISMapPath.cs
- DesignerAttributeInfo.cs
- HttpHandlerActionCollection.cs
- NamespaceDisplayAutomationPeer.cs
- SubpageParagraph.cs
- WindowsUpDown.cs
- UpdatePanelTrigger.cs
- VisualStateManager.cs
- MatrixStack.cs
- BevelBitmapEffect.cs
- DataRelationCollection.cs
- XsltInput.cs
- ToolBarOverflowPanel.cs
- GenericsNotImplementedException.cs
- ClientUrlResolverWrapper.cs
- QueryStringParameter.cs
- ErrorLog.cs
- TextEditorMouse.cs
- ConfigurationFileMap.cs
- PeerObject.cs
- TrustManagerPromptUI.cs
- PathData.cs
- BasicExpressionVisitor.cs
- SQLBoolean.cs
- String.cs
- ReferencedType.cs
- NetworkCredential.cs
- UIElement3DAutomationPeer.cs
- ServiceModelConfigurationElementCollection.cs
- CallbackException.cs
- WebControlsSection.cs
- InternalPermissions.cs
- ExtensionDataReader.cs
- wmiprovider.cs
- NavigationWindowAutomationPeer.cs
- PerformanceCounterManager.cs
- SlotInfo.cs
- Font.cs
- CodeExpressionStatement.cs
- TextTreeObjectNode.cs
- CurrencyManager.cs
- ExeContext.cs
- CellLabel.cs
- DescendantOverDescendantQuery.cs
- XmlSchemaAnnotation.cs
- SectionXmlInfo.cs
- TransformGroup.cs
- SpecialFolderEnumConverter.cs
- Tag.cs
- WaitHandle.cs
- unitconverter.cs
- ByValueEqualityComparer.cs
- KeyFrames.cs
- HtmlTextArea.cs
- SymbolMethod.cs
- CorrelationValidator.cs
- UITypeEditor.cs
- PrivilegeNotHeldException.cs
- CommandHelper.cs
- OAVariantLib.cs
- CounterSetInstanceCounterDataSet.cs
- SqlWebEventProvider.cs
- TranslateTransform.cs
- MapPathBasedVirtualPathProvider.cs
- SchemaExporter.cs
- SHA384Managed.cs
- ItemCollection.cs
- X509RawDataKeyIdentifierClause.cs
- DBDataPermissionAttribute.cs
- AnimatedTypeHelpers.cs
- ProfileProvider.cs
- ImageListStreamer.cs
- HtmlWindowCollection.cs
- EmptyImpersonationContext.cs
- StreamInfo.cs
- CodeIdentifier.cs
- Set.cs
- GroupLabel.cs
- QilTypeChecker.cs
- PreservationFileReader.cs
- SqlAliaser.cs
- SqlWebEventProvider.cs
- HttpDigestClientCredential.cs