Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / SettingsBindableAttribute.cs / 1 / SettingsBindableAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Use this attribute to specify typical properties on components that can be bound
/// to application settings.
///
[AttributeUsage(AttributeTargets.Property)]
public sealed class SettingsBindableAttribute : Attribute {
///
/// Specifies that a property is appropriate to bind settings to.
///
public static readonly SettingsBindableAttribute Yes = new SettingsBindableAttribute(true);
///
/// Specifies that a property is not appropriate to bind settings to.
///
public static readonly SettingsBindableAttribute No = new SettingsBindableAttribute(false);
private bool _bindable = false;
public SettingsBindableAttribute(bool bindable) {
_bindable = bindable;
}
///
/// Gets a value indicating whether a property is appropriate to bind settings to.
///
public bool Bindable {
get {
return _bindable;
}
}
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
if (obj != null && obj is SettingsBindableAttribute) {
return (((SettingsBindableAttribute)obj).Bindable == _bindable);
}
return false;
}
public override int GetHashCode() {
return _bindable.GetHashCode();
}
}
}
// 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;
///
/// Use this attribute to specify typical properties on components that can be bound
/// to application settings.
///
[AttributeUsage(AttributeTargets.Property)]
public sealed class SettingsBindableAttribute : Attribute {
///
/// Specifies that a property is appropriate to bind settings to.
///
public static readonly SettingsBindableAttribute Yes = new SettingsBindableAttribute(true);
///
/// Specifies that a property is not appropriate to bind settings to.
///
public static readonly SettingsBindableAttribute No = new SettingsBindableAttribute(false);
private bool _bindable = false;
public SettingsBindableAttribute(bool bindable) {
_bindable = bindable;
}
///
/// Gets a value indicating whether a property is appropriate to bind settings to.
///
public bool Bindable {
get {
return _bindable;
}
}
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
if (obj != null && obj is SettingsBindableAttribute) {
return (((SettingsBindableAttribute)obj).Bindable == _bindable);
}
return false;
}
public override int GetHashCode() {
return _bindable.GetHashCode();
}
}
}
// 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
- UdpDiscoveryEndpoint.cs
- SchemaMerger.cs
- ProvidePropertyAttribute.cs
- Dispatcher.cs
- StringHelper.cs
- CallbackCorrelationInitializer.cs
- Unit.cs
- SecureEnvironment.cs
- StorageEntityContainerMapping.cs
- safex509handles.cs
- AutomationProperty.cs
- InkCanvasFeedbackAdorner.cs
- XmlILStorageConverter.cs
- FileUtil.cs
- InstanceCreationEditor.cs
- Manipulation.cs
- ProcessingInstructionAction.cs
- NonVisualControlAttribute.cs
- XMLSyntaxException.cs
- Size.cs
- ErrorFormatterPage.cs
- IItemProperties.cs
- IMembershipProvider.cs
- ProcessModelInfo.cs
- DocComment.cs
- AsymmetricSignatureDeformatter.cs
- CorePropertiesFilter.cs
- InputScopeConverter.cs
- QuotedPrintableStream.cs
- StrokeNodeEnumerator.cs
- MarkedHighlightComponent.cs
- TripleDESCryptoServiceProvider.cs
- ResXDataNode.cs
- MenuItemStyleCollection.cs
- MetadataPropertyAttribute.cs
- AppSettingsExpressionEditor.cs
- EpmSyndicationContentSerializer.cs
- ClientSideProviderDescription.cs
- DesignTimeTemplateParser.cs
- FileChangeNotifier.cs
- NativeMethods.cs
- ProgressBarRenderer.cs
- RoutedUICommand.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- EventMetadata.cs
- BufferBuilder.cs
- DataViewListener.cs
- DataBinder.cs
- UnSafeCharBuffer.cs
- ExpandedProjectionNode.cs
- SessionPageStateSection.cs
- Int64Storage.cs
- Propagator.Evaluator.cs
- InvokePattern.cs
- ConstrainedGroup.cs
- WorkflowMarkupSerializationException.cs
- NonBatchDirectoryCompiler.cs
- TextDecorationCollectionConverter.cs
- DecoderBestFitFallback.cs
- FixedDSBuilder.cs
- InfocardInteractiveChannelInitializer.cs
- Thumb.cs
- SafeProcessHandle.cs
- ConnectionProviderAttribute.cs
- CalendarSelectionChangedEventArgs.cs
- FormsAuthentication.cs
- StringValueSerializer.cs
- NumericPagerField.cs
- DataGridPageChangedEventArgs.cs
- Menu.cs
- ReadOnlyDictionary.cs
- SingleTagSectionHandler.cs
- BidOverLoads.cs
- DoubleAnimationBase.cs
- XmlSubtreeReader.cs
- XPathItem.cs
- RC2.cs
- MdImport.cs
- XmlDocumentType.cs
- ResourceReader.cs
- BypassElementCollection.cs
- Compiler.cs
- DbMetaDataFactory.cs
- XamlInt32CollectionSerializer.cs
- Vector3dCollection.cs
- PlacementWorkspace.cs
- ThreadExceptionDialog.cs
- PartitionedDataSource.cs
- GenericUriParser.cs
- XmlObjectSerializerWriteContext.cs
- NameValuePermission.cs
- ControlCollection.cs
- DbgUtil.cs
- HeaderedItemsControl.cs
- _BaseOverlappedAsyncResult.cs
- RotateTransform3D.cs
- FormatVersion.cs
- ConfigurationException.cs
- ToolStripItemEventArgs.cs
- CqlParser.cs