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
- WorkflowOwnerAsyncResult.cs
- ServerValidateEventArgs.cs
- RegexCharClass.cs
- AcceleratedTokenProviderState.cs
- WorkflowViewElement.cs
- Relationship.cs
- PingOptions.cs
- SubclassTypeValidatorAttribute.cs
- odbcmetadatafactory.cs
- ToolStripPanelSelectionBehavior.cs
- AvTrace.cs
- GenericAuthenticationEventArgs.cs
- TextRunCache.cs
- Stopwatch.cs
- HyperLinkField.cs
- TreeViewItemAutomationPeer.cs
- ExpandSegment.cs
- HttpFileCollection.cs
- RepeatBehavior.cs
- WebPartCloseVerb.cs
- WrappedReader.cs
- ControlBuilder.cs
- StringAnimationUsingKeyFrames.cs
- UrlAuthorizationModule.cs
- Int16Animation.cs
- diagnosticsswitches.cs
- FunctionMappingTranslator.cs
- SqlProfileProvider.cs
- SelectionHighlightInfo.cs
- ListControl.cs
- PrincipalPermission.cs
- TableLayoutStyleCollection.cs
- DataPagerFieldCommandEventArgs.cs
- WindowsFont.cs
- HTMLTagNameToTypeMapper.cs
- WebPartUserCapability.cs
- DispatcherExceptionEventArgs.cs
- ServiceRouteHandler.cs
- objectresult_tresulttype.cs
- PropertyValidationContext.cs
- Int16AnimationUsingKeyFrames.cs
- DesignerRegionMouseEventArgs.cs
- WorkflowLayouts.cs
- Types.cs
- FixedHighlight.cs
- InheritedPropertyChangedEventArgs.cs
- UnmanagedMemoryStream.cs
- IUnknownConstantAttribute.cs
- SiteMapDataSourceDesigner.cs
- Container.cs
- SmtpFailedRecipientsException.cs
- ApplicationManager.cs
- _FtpControlStream.cs
- DataConnectionHelper.cs
- UserControlAutomationPeer.cs
- CriticalFinalizerObject.cs
- ProfileService.cs
- WebResourceUtil.cs
- XmlUnspecifiedAttribute.cs
- BinaryFormatter.cs
- GAC.cs
- SplitterPanel.cs
- CreateUserWizardStep.cs
- shaperfactoryquerycacheentry.cs
- PerSessionInstanceContextProvider.cs
- NetNamedPipeSecurityMode.cs
- Camera.cs
- EastAsianLunisolarCalendar.cs
- EpmContentSerializer.cs
- KeyboardEventArgs.cs
- UnmanagedMemoryStream.cs
- __Error.cs
- XPathNavigatorReader.cs
- FlowDocumentView.cs
- XmlEncoding.cs
- SchemaImporterExtensionElementCollection.cs
- GridViewColumnHeader.cs
- TableCell.cs
- SqlConnectionString.cs
- EntityUtil.cs
- XhtmlCssHandler.cs
- FrameAutomationPeer.cs
- OleDbConnectionFactory.cs
- Quad.cs
- DesigntimeLicenseContextSerializer.cs
- UInt64.cs
- SqlRemoveConstantOrderBy.cs
- SoapWriter.cs
- ServerProtocol.cs
- DbDataSourceEnumerator.cs
- ErrorWebPart.cs
- XmlQueryCardinality.cs
- TextBox.cs
- ExpressionValueEditor.cs
- GestureRecognitionResult.cs
- MenuTracker.cs
- MultipartContentParser.cs
- OracleCommand.cs
- DataTable.cs
- ElementUtil.cs