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
- ButtonField.cs
- DataGridViewCellLinkedList.cs
- ThemeDirectoryCompiler.cs
- ConfigurationManagerInternalFactory.cs
- EndPoint.cs
- MissingMemberException.cs
- LinkedResource.cs
- PackageRelationship.cs
- DataTable.cs
- ScrollableControl.cs
- SrgsDocument.cs
- PositiveTimeSpanValidator.cs
- KeyValuePairs.cs
- TemplateInstanceAttribute.cs
- AsyncInvokeContext.cs
- QueryStringParameter.cs
- CompoundFileStorageReference.cs
- RSAPKCS1SignatureFormatter.cs
- BidPrivateBase.cs
- FormsAuthenticationUser.cs
- HtmlButton.cs
- XslTransform.cs
- HttpPostServerProtocol.cs
- DragEvent.cs
- BitmapEffect.cs
- Char.cs
- RichTextBoxAutomationPeer.cs
- X509PeerCertificateElement.cs
- HtmlControlPersistable.cs
- DesignerForm.cs
- ConfigurationManagerHelper.cs
- FixUp.cs
- _IPv6Address.cs
- EventMemberCodeDomSerializer.cs
- CFStream.cs
- Padding.cs
- Buffer.cs
- CheckBox.cs
- QueryAccessibilityHelpEvent.cs
- RowsCopiedEventArgs.cs
- SizeAnimationClockResource.cs
- MediaTimeline.cs
- UInt64.cs
- Attributes.cs
- BlockCollection.cs
- TypeConverterValueSerializer.cs
- NameSpaceEvent.cs
- ManagedWndProcTracker.cs
- BufferModesCollection.cs
- AuthStoreRoleProvider.cs
- SettingsAttributeDictionary.cs
- ResourceContainer.cs
- CultureSpecificStringDictionary.cs
- HtmlControlDesigner.cs
- InvalidEnumArgumentException.cs
- QueryOptionExpression.cs
- XmlReaderSettings.cs
- ApplicationServiceHelper.cs
- FontSizeConverter.cs
- AdornerHitTestResult.cs
- StreamBodyWriter.cs
- InstanceDescriptor.cs
- ProvidersHelper.cs
- SystemIPInterfaceProperties.cs
- PasswordValidationException.cs
- ByteConverter.cs
- DateTimeValueSerializer.cs
- WinFormsUtils.cs
- Membership.cs
- PropertyChangingEventArgs.cs
- SignerInfo.cs
- BinaryObjectWriter.cs
- WorkflowViewService.cs
- SyndicationLink.cs
- ShaderEffect.cs
- HtmlEmptyTagControlBuilder.cs
- QilTypeChecker.cs
- mda.cs
- ItemCheckedEvent.cs
- configsystem.cs
- NavigatingCancelEventArgs.cs
- Condition.cs
- Identifier.cs
- HtmlTableCellCollection.cs
- ISAPIRuntime.cs
- ToolStripSeparatorRenderEventArgs.cs
- XmlComplianceUtil.cs
- CachingHintValidation.cs
- TemplateControlParser.cs
- InternalTypeHelper.cs
- ListBoxItemAutomationPeer.cs
- XpsSerializerWriter.cs
- KeyInstance.cs
- DebuggerAttributes.cs
- UniqueIdentifierService.cs
- NameValueCollection.cs
- ParameterRetriever.cs
- SectionInformation.cs
- ContractsBCL.cs
- DropSource.cs