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
- _AutoWebProxyScriptHelper.cs
- Binding.cs
- OdbcCommand.cs
- SqlExpressionNullability.cs
- SamlEvidence.cs
- ISSmlParser.cs
- AudioException.cs
- HttpCacheParams.cs
- hresults.cs
- HttpCachePolicyWrapper.cs
- ContextMenu.cs
- SafeThreadHandle.cs
- SoapProcessingBehavior.cs
- RelationshipConstraintValidator.cs
- NameValuePair.cs
- OutputCacheProfileCollection.cs
- SetMemberBinder.cs
- AudioSignalProblemOccurredEventArgs.cs
- ColumnWidthChangedEvent.cs
- IdentityModelStringsVersion1.cs
- TerminateWorkflow.cs
- ByteConverter.cs
- DataGridViewSelectedRowCollection.cs
- OpCodes.cs
- AudioDeviceOut.cs
- ObjectStateEntryDbDataRecord.cs
- IncrementalCompileAnalyzer.cs
- RequestBringIntoViewEventArgs.cs
- MessageQueueInstaller.cs
- RandomNumberGenerator.cs
- TripleDES.cs
- activationcontext.cs
- ConnectionStringsExpressionBuilder.cs
- FrameworkContentElement.cs
- FieldAccessException.cs
- DetailsViewUpdatedEventArgs.cs
- DataListComponentEditor.cs
- Scheduling.cs
- UpdateRecord.cs
- OrderedDictionaryStateHelper.cs
- ExcCanonicalXml.cs
- SqlDataSourceTableQuery.cs
- HttpException.cs
- SelectingProviderEventArgs.cs
- PropertyChangeTracker.cs
- PageCodeDomTreeGenerator.cs
- ItemAutomationPeer.cs
- GridItemCollection.cs
- StrokeRenderer.cs
- ErrorEventArgs.cs
- UnsafeNativeMethodsTablet.cs
- SynchronousSendBindingElement.cs
- CallbackException.cs
- RegexGroup.cs
- LinkAreaEditor.cs
- ColumnClickEvent.cs
- DataGridViewRowCancelEventArgs.cs
- XmlHierarchicalDataSourceView.cs
- ContainerVisual.cs
- CheckBoxStandardAdapter.cs
- EmbeddedMailObject.cs
- DesignerVerbCollection.cs
- RectangleConverter.cs
- HelpEvent.cs
- NullableLongAverageAggregationOperator.cs
- PointConverter.cs
- oledbmetadatacollectionnames.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ClientOptions.cs
- MonthChangedEventArgs.cs
- InternalException.cs
- QueryStringParameter.cs
- OdbcPermission.cs
- XmlEncodedRawTextWriter.cs
- DispatcherExceptionEventArgs.cs
- smtpconnection.cs
- UrlAuthFailureHandler.cs
- dbenumerator.cs
- HttpRequestCacheValidator.cs
- TransportSecurityHelpers.cs
- QueryInterceptorAttribute.cs
- TableRow.cs
- SqlParameter.cs
- AssemblyNameProxy.cs
- ProjectionAnalyzer.cs
- EnterpriseServicesHelper.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- PointConverter.cs
- ComponentChangedEvent.cs
- AttachedPropertyInfo.cs
- TreeNodeBinding.cs
- DesignTimeVisibleAttribute.cs
- FixedDocument.cs
- FtpCachePolicyElement.cs
- LoginView.cs
- WebPartConnectionCollection.cs
- OleDbReferenceCollection.cs
- Splitter.cs
- CustomGrammar.cs
- DocumentCollection.cs