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
- CodePageUtils.cs
- ExpandoClass.cs
- XmlSerializerVersionAttribute.cs
- SR.cs
- CssTextWriter.cs
- PropertyMapper.cs
- GCHandleCookieTable.cs
- GroupBox.cs
- ProfileModule.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- PropertyChangedEventArgs.cs
- ItemsPanelTemplate.cs
- WS2007FederationHttpBinding.cs
- HostExecutionContextManager.cs
- IndexOutOfRangeException.cs
- PrimitiveRenderer.cs
- CachedFontFace.cs
- ColorInterpolationModeValidation.cs
- SafeFileHandle.cs
- ToolboxBitmapAttribute.cs
- SplitContainer.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- SerializationAttributes.cs
- Encoding.cs
- Button.cs
- SignatureDescription.cs
- SmtpSection.cs
- OperationCanceledException.cs
- MimeParameter.cs
- ShapingWorkspace.cs
- XamlGridLengthSerializer.cs
- HtmlMeta.cs
- WebBrowserSiteBase.cs
- HashAlgorithm.cs
- HttpCookieCollection.cs
- WsdlWriter.cs
- WebBaseEventKeyComparer.cs
- GridViewColumn.cs
- HitTestWithPointDrawingContextWalker.cs
- TypeBuilder.cs
- ProtocolsConfigurationHandler.cs
- SerializationFieldInfo.cs
- DataError.cs
- EventLogInformation.cs
- QueryContinueDragEventArgs.cs
- _PooledStream.cs
- PTConverter.cs
- webeventbuffer.cs
- DocumentReference.cs
- DbConnectionClosed.cs
- ColorConverter.cs
- ProgressBarBrushConverter.cs
- TimelineGroup.cs
- BitmapEffectInputConnector.cs
- SystemIPGlobalProperties.cs
- SecurityCookieModeValidator.cs
- StringHandle.cs
- Help.cs
- MdiWindowListItemConverter.cs
- SessionStateSection.cs
- ResourceReferenceExpressionConverter.cs
- ColorInterpolationModeValidation.cs
- CornerRadiusConverter.cs
- Buffer.cs
- TextTreeObjectNode.cs
- ScriptingRoleServiceSection.cs
- DbConnectionInternal.cs
- ProvidersHelper.cs
- IndentedWriter.cs
- ClrProviderManifest.cs
- PrimitiveDataContract.cs
- DataGridViewHitTestInfo.cs
- SafeFileMappingHandle.cs
- InputLanguageEventArgs.cs
- CompilerCollection.cs
- XmlMapping.cs
- View.cs
- XmlILAnnotation.cs
- EventLogLink.cs
- CallSiteOps.cs
- EntityContainerRelationshipSetEnd.cs
- CodeVariableDeclarationStatement.cs
- SpeakInfo.cs
- XmlDataSourceView.cs
- MarshalByRefObject.cs
- ControlEvent.cs
- controlskin.cs
- DesignerForm.cs
- InstanceHandleReference.cs
- DocumentOutline.cs
- PageParserFilter.cs
- NativeCppClassAttribute.cs
- EntitySetRetriever.cs
- Event.cs
- LogRestartAreaEnumerator.cs
- FormCollection.cs
- WebPartMenu.cs
- ListenerAdapter.cs
- OdbcEnvironmentHandle.cs