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
- ErrorLog.cs
- DecimalAnimation.cs
- RuntimeResourceSet.cs
- TableLayoutColumnStyleCollection.cs
- ModelPropertyDescriptor.cs
- Size3DConverter.cs
- JumpPath.cs
- PathStreamGeometryContext.cs
- MetadataCacheItem.cs
- StrokeNode.cs
- PreloadedPackages.cs
- StandardOleMarshalObject.cs
- ItemList.cs
- BoundField.cs
- XmlSiteMapProvider.cs
- EncryptedHeaderXml.cs
- ConfigurationStrings.cs
- FaultImportOptions.cs
- ClientSettingsSection.cs
- DBCommand.cs
- ImageField.cs
- InvokeWebService.cs
- TypefaceMap.cs
- AppDomainUnloadedException.cs
- CompModSwitches.cs
- ConvertEvent.cs
- BaseDataList.cs
- InlineUIContainer.cs
- ProxyGenerator.cs
- MsmqIntegrationProcessProtocolHandler.cs
- PathFigure.cs
- TailCallAnalyzer.cs
- Section.cs
- CursorInteropHelper.cs
- ConnectionManagementElement.cs
- AccessibilityApplicationManager.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- Translator.cs
- Base64WriteStateInfo.cs
- WrapperSecurityCommunicationObject.cs
- ModelService.cs
- DoubleLinkList.cs
- FixedPage.cs
- CompilerState.cs
- BasePattern.cs
- ExpressionNode.cs
- RegexReplacement.cs
- SQLInt64Storage.cs
- HashMembershipCondition.cs
- TableHeaderCell.cs
- OperationParameterInfoCollection.cs
- uribuilder.cs
- CheckBoxPopupAdapter.cs
- RightsManagementSuppressedStream.cs
- ProjectionPlan.cs
- StringConverter.cs
- CodeTypeDelegate.cs
- IImplicitResourceProvider.cs
- ImageMetadata.cs
- CanonicalXml.cs
- ResourceProviderFactory.cs
- PresentationTraceSources.cs
- MasterPage.cs
- Geometry3D.cs
- CaseCqlBlock.cs
- DocumentViewerBaseAutomationPeer.cs
- CompileLiteralTextParser.cs
- TrackingMemoryStreamFactory.cs
- Mutex.cs
- ImageButton.cs
- ConnectionPoint.cs
- XmlQueryTypeFactory.cs
- XmlSerializationWriter.cs
- ToolboxComponentsCreatingEventArgs.cs
- BulletChrome.cs
- BindingElement.cs
- EnumValAlphaComparer.cs
- HeaderedContentControl.cs
- FamilyMap.cs
- recordstate.cs
- SamlAuthenticationStatement.cs
- SqlComparer.cs
- WebPartHelpVerb.cs
- FaultDescription.cs
- TagPrefixInfo.cs
- FusionWrap.cs
- DataGridViewEditingControlShowingEventArgs.cs
- XmlRawWriterWrapper.cs
- ColumnWidthChangingEvent.cs
- IssuedTokenParametersElement.cs
- DataGridCell.cs
- WebBodyFormatMessageProperty.cs
- securitycriticaldata.cs
- XmlSigningNodeWriter.cs
- InvalidEnumArgumentException.cs
- DBCSCodePageEncoding.cs
- HtmlTable.cs
- TemplateControlCodeDomTreeGenerator.cs
- BevelBitmapEffect.cs
- ActiveXContainer.cs