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
- SizeLimitedCache.cs
- XmlUnspecifiedAttribute.cs
- SubclassTypeValidatorAttribute.cs
- HttpListenerResponse.cs
- KnownBoxes.cs
- TypedReference.cs
- MetadataItemEmitter.cs
- ClientRuntimeConfig.cs
- XmlDocumentType.cs
- SignedXmlDebugLog.cs
- DateTimeConverter.cs
- DataGridViewRowPostPaintEventArgs.cs
- WebRequestModuleElementCollection.cs
- HttpListenerContext.cs
- BitmapEffectInputData.cs
- InternalControlCollection.cs
- JoinSymbol.cs
- QuaternionKeyFrameCollection.cs
- Handle.cs
- FormViewRow.cs
- Latin1Encoding.cs
- UriSection.cs
- HitTestParameters3D.cs
- BuildResult.cs
- OleDbException.cs
- IgnoreFileBuildProvider.cs
- AnnotationResource.cs
- DatatypeImplementation.cs
- TextServicesCompartmentContext.cs
- VisualTarget.cs
- AnnotationAuthorChangedEventArgs.cs
- ActivityTypeResolver.xaml.cs
- VisualStyleRenderer.cs
- DataObject.cs
- DataGridViewColumnConverter.cs
- GiveFeedbackEvent.cs
- GeneratedView.cs
- SHA384.cs
- EntityContainerRelationshipSet.cs
- Form.cs
- AppDomainGrammarProxy.cs
- MutexSecurity.cs
- CodeDomConfigurationHandler.cs
- NetworkCredential.cs
- OleAutBinder.cs
- TagPrefixCollection.cs
- Compiler.cs
- TextPointerBase.cs
- BulletedList.cs
- DNS.cs
- FormsAuthenticationEventArgs.cs
- HttpSessionStateBase.cs
- SpecialFolderEnumConverter.cs
- Rect3D.cs
- BaseConfigurationRecord.cs
- TagPrefixCollection.cs
- PositiveTimeSpanValidator.cs
- DataGridToolTip.cs
- PackWebRequest.cs
- DomNameTable.cs
- ImmutablePropertyDescriptorGridEntry.cs
- TemplateBindingExpressionConverter.cs
- Repeater.cs
- PostBackOptions.cs
- SiteIdentityPermission.cs
- RoutedEventValueSerializer.cs
- GridViewDeleteEventArgs.cs
- DropDownButton.cs
- CodeStatementCollection.cs
- SlotInfo.cs
- VisualProxy.cs
- ReflectTypeDescriptionProvider.cs
- MouseEventArgs.cs
- DataTablePropertyDescriptor.cs
- ScrollBarAutomationPeer.cs
- SspiWrapper.cs
- CanonicalFormWriter.cs
- LogSwitch.cs
- AssociationProvider.cs
- FilePrompt.cs
- TabControl.cs
- BaseDataList.cs
- DetailsViewDesigner.cs
- SHA512.cs
- StyleSelector.cs
- HandlerBase.cs
- TypeViewSchema.cs
- ToolStripDropDownItemDesigner.cs
- StateManagedCollection.cs
- KnownAssembliesSet.cs
- MatchingStyle.cs
- Point3DCollectionValueSerializer.cs
- ButtonFieldBase.cs
- TagPrefixCollection.cs
- DataGridViewColumnConverter.cs
- XmlSubtreeReader.cs
- SQLDecimal.cs
- TimeSpanFormat.cs
- XmlElement.cs
- ContentType.cs