Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ValueExpressions.cs
- ValidatingCollection.cs
- CustomWebEventKey.cs
- HttpApplicationFactory.cs
- XmlBufferReader.cs
- EntryPointNotFoundException.cs
- RuntimeHelpers.cs
- Config.cs
- VScrollBar.cs
- FrameworkElementFactoryMarkupObject.cs
- TransportListener.cs
- AppModelKnownContentFactory.cs
- SiteMapDataSourceView.cs
- WebServiceEnumData.cs
- WebPartCollection.cs
- CodeTypeDelegate.cs
- xml.cs
- FilterQueryOptionExpression.cs
- FileDialog.cs
- ClickablePoint.cs
- WebEventCodes.cs
- _SecureChannel.cs
- AttributeCallbackBuilder.cs
- MarkerProperties.cs
- ControlCachePolicy.cs
- RuleSettingsCollection.cs
- StoreAnnotationsMap.cs
- PageThemeParser.cs
- SecurityProtocolCorrelationState.cs
- KeyEvent.cs
- WinFormsSpinner.cs
- XPathMessageFilterElement.cs
- Point3DCollection.cs
- SystemIPInterfaceStatistics.cs
- TrackingProvider.cs
- OdbcError.cs
- DataGridViewCellValueEventArgs.cs
- TableColumn.cs
- ShutDownListener.cs
- SendSecurityHeaderElement.cs
- Container.cs
- ExecutedRoutedEventArgs.cs
- NameGenerator.cs
- ThrowOnMultipleAssignment.cs
- SynchronizationContext.cs
- Pair.cs
- ResizeGrip.cs
- RoutedEventHandlerInfo.cs
- EventMappingSettings.cs
- PreservationFileWriter.cs
- FtpWebRequest.cs
- InternalConfigConfigurationFactory.cs
- ObjectViewEntityCollectionData.cs
- ThumbAutomationPeer.cs
- Int64Converter.cs
- TreeViewImageKeyConverter.cs
- SamlAuthenticationClaimResource.cs
- UnsafeNativeMethods.cs
- OutputBuffer.cs
- SecurityRuntime.cs
- Mutex.cs
- NavigateEvent.cs
- DocumentApplicationJournalEntry.cs
- StrongTypingException.cs
- TextParagraphView.cs
- NamedPipeHostedTransportConfiguration.cs
- ToolTipAutomationPeer.cs
- SQLDateTimeStorage.cs
- WebException.cs
- HttpCookiesSection.cs
- StyleXamlParser.cs
- DisposableCollectionWrapper.cs
- SoapServerMessage.cs
- StringUtil.cs
- DesignerActionItemCollection.cs
- invalidudtexception.cs
- CallbackValidator.cs
- AuthenticationConfig.cs
- ProtocolsConfiguration.cs
- ExtensionDataReader.cs
- BaseServiceProvider.cs
- InternalEnumValidatorAttribute.cs
- ScriptingProfileServiceSection.cs
- CancelEventArgs.cs
- StrongNameUtility.cs
- DataGridViewColumnConverter.cs
- JoinElimination.cs
- DSACryptoServiceProvider.cs
- WebUtil.cs
- TrackingProfileSerializer.cs
- SequenceQuery.cs
- DtcInterfaces.cs
- ExpandableObjectConverter.cs
- __ComObject.cs
- WorkItem.cs
- WasAdminWrapper.cs
- FormsAuthenticationUserCollection.cs
- AssociationSetEnd.cs
- TemplateNameScope.cs
- OAVariantLib.cs