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
- PathTooLongException.cs
- ToolboxCategoryItems.cs
- TripleDESCryptoServiceProvider.cs
- QilFunction.cs
- ZipIOModeEnforcingStream.cs
- RMEnrollmentPage1.cs
- GradientStop.cs
- DataRowChangeEvent.cs
- CharacterShapingProperties.cs
- DataGridViewButtonCell.cs
- ChannelSinkStacks.cs
- Graphics.cs
- SoapSchemaImporter.cs
- Identifier.cs
- XmlNodeReader.cs
- VerticalAlignConverter.cs
- NotCondition.cs
- SafeFindHandle.cs
- TCPClient.cs
- WebResponse.cs
- DataPagerFieldItem.cs
- InternalDispatchObject.cs
- SmiMetaData.cs
- GridViewRowPresenterBase.cs
- EventMappingSettingsCollection.cs
- externdll.cs
- FieldAccessException.cs
- EncryptedKey.cs
- TypeNameConverter.cs
- GrabHandleGlyph.cs
- DataBindEngine.cs
- ProfileParameter.cs
- MimeTypePropertyAttribute.cs
- TemplateLookupAction.cs
- ComponentCollection.cs
- SignatureConfirmations.cs
- BindingNavigator.cs
- NeutralResourcesLanguageAttribute.cs
- Array.cs
- ElapsedEventArgs.cs
- DelegateHelpers.cs
- IPPacketInformation.cs
- ServiceObjectContainer.cs
- SoapReflectionImporter.cs
- IsolatedStorage.cs
- Msmq4PoisonHandler.cs
- UserControl.cs
- XmlCharType.cs
- HtmlInputFile.cs
- ValueUtilsSmi.cs
- CharEntityEncoderFallback.cs
- IconConverter.cs
- CodeArrayCreateExpression.cs
- NativeActivityTransactionContext.cs
- Assembly.cs
- HitTestWithPointDrawingContextWalker.cs
- ExecutionScope.cs
- WebPartCatalogAddVerb.cs
- TransactionInterop.cs
- DatePickerAutomationPeer.cs
- PermissionSet.cs
- ObjectListCommand.cs
- TraceContextEventArgs.cs
- QuotedStringFormatReader.cs
- XmlIncludeAttribute.cs
- XmlSchemaObjectTable.cs
- PlainXmlSerializer.cs
- Peer.cs
- ScrollBarRenderer.cs
- ComponentChangedEvent.cs
- QuotaExceededException.cs
- Region.cs
- WaitHandleCannotBeOpenedException.cs
- PersistChildrenAttribute.cs
- PropertyValueEditor.cs
- KeyValuePairs.cs
- DataTableNameHandler.cs
- dataobject.cs
- InheritanceAttribute.cs
- CurrencyWrapper.cs
- ParameterSubsegment.cs
- CounterNameConverter.cs
- HtmlSelect.cs
- SequenceQuery.cs
- BufferAllocator.cs
- uribuilder.cs
- DebuggerAttributes.cs
- DataGridViewImageColumn.cs
- QueryOperator.cs
- CollectionCodeDomSerializer.cs
- sitestring.cs
- UIElementPropertyUndoUnit.cs
- QueryOperationResponseOfT.cs
- IdentifierCollection.cs
- MediaElementAutomationPeer.cs
- DataGridViewBindingCompleteEventArgs.cs
- DrawItemEvent.cs
- CombinedGeometry.cs
- SingleObjectCollection.cs
- PageRouteHandler.cs