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
- HttpCacheVary.cs
- ExeContext.cs
- ACE.cs
- WebPartConnectionsCancelVerb.cs
- TableProviderWrapper.cs
- AccessControlEntry.cs
- IISUnsafeMethods.cs
- ConsumerConnectionPointCollection.cs
- Material.cs
- ParentUndoUnit.cs
- TextBounds.cs
- DataGridViewRowConverter.cs
- UIElementParaClient.cs
- UserUseLicenseDictionaryLoader.cs
- TypedReference.cs
- WsrmFault.cs
- SchemaTableOptionalColumn.cs
- EventMap.cs
- RayHitTestParameters.cs
- AnnotationComponentManager.cs
- Task.cs
- PolyBezierSegment.cs
- ListCollectionView.cs
- FunctionCommandText.cs
- ButtonBase.cs
- TabItem.cs
- PropertyInformation.cs
- HotSpot.cs
- CanExecuteRoutedEventArgs.cs
- PrincipalPermission.cs
- ExpandedWrapper.cs
- GenericUriParser.cs
- SponsorHelper.cs
- SHA1Managed.cs
- TraceRecord.cs
- RequestBringIntoViewEventArgs.cs
- RunWorkerCompletedEventArgs.cs
- NameSpaceEvent.cs
- StringUtil.cs
- QueryStringParameter.cs
- SafeTokenHandle.cs
- Util.cs
- WebEvents.cs
- StringConverter.cs
- log.cs
- PartialList.cs
- File.cs
- Stream.cs
- BinaryParser.cs
- PointValueSerializer.cs
- WebBrowsableAttribute.cs
- SendMailErrorEventArgs.cs
- DesignerTextViewAdapter.cs
- NameValueConfigurationElement.cs
- XmlWrappingReader.cs
- RotateTransform3D.cs
- FieldMetadata.cs
- IResourceProvider.cs
- SrgsItemList.cs
- ToolStripGripRenderEventArgs.cs
- XmlTypeAttribute.cs
- SetterTriggerConditionValueConverter.cs
- CryptoConfig.cs
- X509CertificateCollection.cs
- GC.cs
- WebPartConnection.cs
- EnterpriseServicesHelper.cs
- HtmlLink.cs
- XmlSignificantWhitespace.cs
- DataPager.cs
- ChannelServices.cs
- ModuleElement.cs
- Script.cs
- RangeExpression.cs
- DefaultAssemblyResolver.cs
- CharacterMetrics.cs
- ListViewAutomationPeer.cs
- TrackingAnnotationCollection.cs
- SiteMapNodeItemEventArgs.cs
- AssemblyName.cs
- AutomationIdentifierGuids.cs
- DataKey.cs
- WorkflowIdleBehavior.cs
- XmlValidatingReader.cs
- SqlDependencyUtils.cs
- ColumnResult.cs
- prompt.cs
- EntityClientCacheKey.cs
- PrivilegedConfigurationManager.cs
- ListControlConvertEventArgs.cs
- Matrix.cs
- ClientUrlResolverWrapper.cs
- BitmapCache.cs
- DrawingAttributeSerializer.cs
- Transform3DGroup.cs
- StylusPointProperty.cs
- MsmqSecureHashAlgorithm.cs
- SetterTriggerConditionValueConverter.cs
- DesignerEventService.cs
- CommentEmitter.cs