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
- FunctionDescription.cs
- FlowNode.cs
- EntityDataSourceStatementEditor.cs
- securitycriticaldata.cs
- FixedSOMTableRow.cs
- Size3DValueSerializer.cs
- CheckedListBox.cs
- XmlSchemaAppInfo.cs
- SpeechDetectedEventArgs.cs
- StagingAreaInputItem.cs
- ReflectionHelper.cs
- SqlMethodTransformer.cs
- TypeInitializationException.cs
- LoadItemsEventArgs.cs
- Environment.cs
- DataGridRowDetailsEventArgs.cs
- DrawingGroup.cs
- TrackingQueryElement.cs
- CursorInteropHelper.cs
- CustomValidator.cs
- DataColumnCollection.cs
- WebControlsSection.cs
- SplineQuaternionKeyFrame.cs
- SiteIdentityPermission.cs
- UpDownBase.cs
- RegexGroup.cs
- FormsAuthenticationModule.cs
- SafeFileMappingHandle.cs
- StringDictionary.cs
- DocumentViewerHelper.cs
- GenerateScriptTypeAttribute.cs
- FrameAutomationPeer.cs
- DataControlImageButton.cs
- MetadataArtifactLoaderResource.cs
- DataDocumentXPathNavigator.cs
- HostedBindingBehavior.cs
- SqlDataSourceSelectingEventArgs.cs
- CollectionExtensions.cs
- ImmutableObjectAttribute.cs
- WebPartCatalogAddVerb.cs
- FormClosedEvent.cs
- PrimitiveXmlSerializers.cs
- StringHelper.cs
- SmtpMail.cs
- CodeAttributeDeclarationCollection.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- Permission.cs
- HtmlWindow.cs
- HttpListenerPrefixCollection.cs
- DoubleCollectionValueSerializer.cs
- ScrollableControlDesigner.cs
- StructuralCache.cs
- WorkflowMarkupSerializationProvider.cs
- GridViewActionList.cs
- EntityConnectionStringBuilder.cs
- DeobfuscatingStream.cs
- PermissionAttributes.cs
- XmlHelper.cs
- CompositeFontParser.cs
- CustomGrammar.cs
- Menu.cs
- PermissionSetEnumerator.cs
- ManagedIStream.cs
- NativeBuffer.cs
- ContextInformation.cs
- GroupDescription.cs
- invalidudtexception.cs
- HandleTable.cs
- CorrelationManager.cs
- TdsValueSetter.cs
- xsdvalidator.cs
- HatchBrush.cs
- EntityReference.cs
- CloseSequence.cs
- TaiwanCalendar.cs
- SchemaType.cs
- SettingsPropertyValue.cs
- Vector3D.cs
- ToolBar.cs
- SqlUDTStorage.cs
- TableParagraph.cs
- UInt64Storage.cs
- CodeDirectoryCompiler.cs
- ListDataBindEventArgs.cs
- _LocalDataStoreMgr.cs
- DBParameter.cs
- NodeFunctions.cs
- CustomValidator.cs
- PropertyChangedEventArgs.cs
- IntPtr.cs
- CroppedBitmap.cs
- SingleStorage.cs
- AssemblyFilter.cs
- LicFileLicenseProvider.cs
- DataGridViewCellCollection.cs
- BrowserCapabilitiesFactoryBase.cs
- ParenthesizePropertyNameAttribute.cs
- HtmlSelectionListAdapter.cs
- _HeaderInfoTable.cs
- MailBnfHelper.cs