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
- ConfigXmlAttribute.cs
- CompareValidator.cs
- SQLResource.cs
- StatusStrip.cs
- CompoundFileReference.cs
- HtmlForm.cs
- ProfileService.cs
- BinHexDecoder.cs
- AbstractExpressions.cs
- SafeCryptHandles.cs
- StyleModeStack.cs
- _SingleItemRequestCache.cs
- DependentList.cs
- DataGridViewColumnCollection.cs
- Font.cs
- DisableDpiAwarenessAttribute.cs
- UnknownWrapper.cs
- DesignerActionItem.cs
- LocatorManager.cs
- ImageCodecInfoPrivate.cs
- EdgeProfileValidation.cs
- TreeNodeClickEventArgs.cs
- BuildResultCache.cs
- Math.cs
- DesignerCalendarAdapter.cs
- WebPartCollection.cs
- AdRotator.cs
- IPAddress.cs
- BaseServiceProvider.cs
- FormatException.cs
- BrowserCapabilitiesFactory.cs
- XmlIncludeAttribute.cs
- EditingCoordinator.cs
- AuthenticationService.cs
- StringFreezingAttribute.cs
- Bitmap.cs
- ChtmlSelectionListAdapter.cs
- XmlSchemaAttributeGroup.cs
- MobileTemplatedControlDesigner.cs
- Visual3D.cs
- XmlHierarchicalDataSourceView.cs
- HtmlAnchor.cs
- TransportContext.cs
- ContentWrapperAttribute.cs
- DictionaryEntry.cs
- DataSourceCache.cs
- LinqToSqlWrapper.cs
- Compiler.cs
- ColorConvertedBitmapExtension.cs
- CloudCollection.cs
- LabelAutomationPeer.cs
- GlyphShapingProperties.cs
- XPathItem.cs
- DataGridViewLinkCell.cs
- HelpKeywordAttribute.cs
- HttpPostServerProtocol.cs
- WebPartUtil.cs
- AdapterUtil.cs
- PropertyMapper.cs
- StorageRoot.cs
- DataGridViewSortCompareEventArgs.cs
- SystemThemeKey.cs
- DictionaryEntry.cs
- DataViewListener.cs
- sqlser.cs
- RijndaelManagedTransform.cs
- BaseAppDomainProtocolHandler.cs
- MetaType.cs
- DataIdProcessor.cs
- XmlSiteMapProvider.cs
- Transform3D.cs
- AccessDataSource.cs
- documentsequencetextcontainer.cs
- BridgeDataReader.cs
- MarshalDirectiveException.cs
- PropertyValidationContext.cs
- DataServiceResponse.cs
- SqlInfoMessageEvent.cs
- Barrier.cs
- FixedPosition.cs
- XPathSingletonIterator.cs
- DataGridTextBox.cs
- TypeUtil.cs
- EnvironmentPermission.cs
- WebServiceParameterData.cs
- Error.cs
- WebPartUserCapability.cs
- NameObjectCollectionBase.cs
- ToolStripDropDownButton.cs
- ZipIOExtraFieldZip64Element.cs
- SqlCaseSimplifier.cs
- RuntimeConfigurationRecord.cs
- webeventbuffer.cs
- Cloud.cs
- Effect.cs
- CodeGeneratorAttribute.cs
- MergeFilterQuery.cs
- X509CertificateTokenFactoryCredential.cs
- _NetworkingPerfCounters.cs
- AssemblyResolver.cs