Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ServiceNotStartedException.cs
- DocumentGrid.cs
- QilTargetType.cs
- ResizeGrip.cs
- Emitter.cs
- GeneralTransform3DTo2D.cs
- CatalogZone.cs
- FocusTracker.cs
- ThreadExceptionEvent.cs
- FormsAuthenticationUserCollection.cs
- DbQueryCommandTree.cs
- GridItemProviderWrapper.cs
- WaitHandleCannotBeOpenedException.cs
- ByteAnimation.cs
- UInt64.cs
- HttpProfileGroupBase.cs
- DelayDesigner.cs
- processwaithandle.cs
- FormViewInsertEventArgs.cs
- SpecialNameAttribute.cs
- AnnotationService.cs
- Validator.cs
- AppliedDeviceFiltersDialog.cs
- Tablet.cs
- DataRowCollection.cs
- PassportPrincipal.cs
- LinearGradientBrush.cs
- RelationshipEnd.cs
- CredentialCache.cs
- AliasedExpr.cs
- Synchronization.cs
- StylusEditingBehavior.cs
- TreeNodeStyleCollection.cs
- ErrorRuntimeConfig.cs
- HttpCapabilitiesEvaluator.cs
- InstanceLockQueryResult.cs
- UrlAuthFailedErrorFormatter.cs
- ColumnWidthChangedEvent.cs
- propertyentry.cs
- PersonalizationState.cs
- LocalServiceSecuritySettingsElement.cs
- TextDocumentView.cs
- String.cs
- PrimitiveXmlSerializers.cs
- FocusTracker.cs
- EmptyCollection.cs
- DataGridViewTextBoxColumn.cs
- FixedElement.cs
- EdmScalarPropertyAttribute.cs
- RuntimeConfigLKG.cs
- WebPartCloseVerb.cs
- RIPEMD160Managed.cs
- WindowsFormsHostAutomationPeer.cs
- ClusterSafeNativeMethods.cs
- HttpMethodConstraint.cs
- SmtpFailedRecipientsException.cs
- WebSysDescriptionAttribute.cs
- InvokeGenerator.cs
- OracleParameter.cs
- ToolStripMenuItem.cs
- DataSourceGeneratorException.cs
- BlurBitmapEffect.cs
- HostingEnvironment.cs
- XmlMapping.cs
- SmtpException.cs
- BindingContext.cs
- FontWeight.cs
- CompilerCollection.cs
- RunClient.cs
- Color.cs
- Encoder.cs
- ColumnCollection.cs
- SafeCoTaskMem.cs
- TreeNodeCollection.cs
- FixedSOMContainer.cs
- DTCTransactionManager.cs
- SuppressIldasmAttribute.cs
- SplitterCancelEvent.cs
- RootBrowserWindowProxy.cs
- Debugger.cs
- PolyQuadraticBezierSegment.cs
- BitmapSizeOptions.cs
- DataColumnCollection.cs
- NGCSerializerAsync.cs
- FrameDimension.cs
- ListManagerBindingsCollection.cs
- ResourceReferenceExpression.cs
- RegexCompilationInfo.cs
- Repeater.cs
- GroupAggregateExpr.cs
- DataComponentNameHandler.cs
- XmlWriter.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- Panel.cs
- KeyedCollection.cs
- ProtocolViolationException.cs
- ToolTipAutomationPeer.cs
- ToolStripDropDownButton.cs
- ServiceTimeoutsBehavior.cs
- MenuCommands.cs