Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / SettingsBindableAttribute.cs / 1305376 / 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
- SingleStorage.cs
- UpdateRecord.cs
- FixedLineResult.cs
- DoWorkEventArgs.cs
- GcHandle.cs
- Message.cs
- BaseDataBoundControl.cs
- ResourceBinder.cs
- EncryptedReference.cs
- PropertyInformationCollection.cs
- Context.cs
- unsafeIndexingFilterStream.cs
- entitydatasourceentitysetnameconverter.cs
- ProfileParameter.cs
- ImageListImageEditor.cs
- EditingCoordinator.cs
- TreeNodeEventArgs.cs
- MultiByteCodec.cs
- StylusPlugin.cs
- IPCCacheManager.cs
- WindowsAuthenticationModule.cs
- SqlBulkCopyColumnMappingCollection.cs
- EdmConstants.cs
- ProcessHostMapPath.cs
- CatalogPartChrome.cs
- BooleanProjectedSlot.cs
- EllipseGeometry.cs
- LinearQuaternionKeyFrame.cs
- TrustManagerMoreInformation.cs
- XmlnsDictionary.cs
- Configuration.cs
- Rotation3DAnimation.cs
- EventHandlerList.cs
- CapiNative.cs
- TriState.cs
- MenuItemBindingCollection.cs
- XmlSchemaSimpleContentRestriction.cs
- SqlCacheDependencyDatabaseCollection.cs
- SqlBooleanMismatchVisitor.cs
- QueryResultOp.cs
- ActivityBindForm.cs
- CachedPathData.cs
- MethodToken.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- EditorZone.cs
- CompilerInfo.cs
- PointUtil.cs
- Int16KeyFrameCollection.cs
- FormDocumentDesigner.cs
- Set.cs
- DbConnectionPool.cs
- GridViewSortEventArgs.cs
- InstalledFontCollection.cs
- TypeSystemHelpers.cs
- MsmqOutputMessage.cs
- URLMembershipCondition.cs
- DataGridViewSelectedColumnCollection.cs
- SEHException.cs
- PartialCachingControl.cs
- XamlParser.cs
- BoundField.cs
- PocoEntityKeyStrategy.cs
- ToolStripCodeDomSerializer.cs
- AudioFileOut.cs
- XmlDataSource.cs
- DesignerLinkAdapter.cs
- DrawingCollection.cs
- CatalogPartChrome.cs
- NGCUIElementCollectionSerializerAsync.cs
- ElapsedEventArgs.cs
- ToolStripLocationCancelEventArgs.cs
- ControlBindingsCollection.cs
- LinqDataView.cs
- updatecommandorderer.cs
- AppDomainUnloadedException.cs
- ClientOptions.cs
- FilterRepeater.cs
- safemediahandle.cs
- HttpCachePolicy.cs
- FixedFlowMap.cs
- CommonProperties.cs
- SizeFConverter.cs
- CustomErrorsSectionWrapper.cs
- XomlDesignerLoader.cs
- DropDownHolder.cs
- Subtree.cs
- ApplicationGesture.cs
- _ConnectStream.cs
- PointF.cs
- BooleanToVisibilityConverter.cs
- CollaborationHelperFunctions.cs
- MultiTrigger.cs
- ImageField.cs
- AccessDataSource.cs
- OutOfMemoryException.cs
- InternalConfigSettingsFactory.cs
- PaginationProgressEventArgs.cs
- ScriptIgnoreAttribute.cs
- UpdateTranslator.cs
- OdbcErrorCollection.cs