Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / SettingsBindableAttribute.cs / 1305376 / 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
- Ref.cs
- Stream.cs
- HitTestParameters.cs
- ActivityMarkupSerializationProvider.cs
- AsnEncodedData.cs
- BitStack.cs
- FixedSchema.cs
- VBIdentifierName.cs
- StructuredType.cs
- TreeView.cs
- FrameworkTextComposition.cs
- GenerateTemporaryAssemblyTask.cs
- LocalFileSettingsProvider.cs
- SqlCommand.cs
- MessagePropertyAttribute.cs
- ConsoleKeyInfo.cs
- StylusTip.cs
- PropertyNames.cs
- CodeStatementCollection.cs
- CommonObjectSecurity.cs
- BitmapSourceSafeMILHandle.cs
- HtmlControlPersistable.cs
- DataSetMappper.cs
- ellipse.cs
- UIElementPropertyUndoUnit.cs
- DataGridViewRowConverter.cs
- RadioButtonFlatAdapter.cs
- ApplicationSecurityManager.cs
- HttpClientCertificate.cs
- SemanticResolver.cs
- UseLicense.cs
- XmlSchemaSet.cs
- RequiredFieldValidator.cs
- ServiceModelEnumValidatorAttribute.cs
- ConditionChanges.cs
- MaskDesignerDialog.cs
- DataSetMappper.cs
- DynamicObject.cs
- BinHexDecoder.cs
- DataServiceStreamProviderWrapper.cs
- SmtpFailedRecipientsException.cs
- VarRemapper.cs
- WindowsPrincipal.cs
- SoapAttributeAttribute.cs
- ObfuscationAttribute.cs
- METAHEADER.cs
- WinFormsComponentEditor.cs
- GroupAggregateExpr.cs
- VoiceChangeEventArgs.cs
- SchemaConstraints.cs
- FormatConvertedBitmap.cs
- SingleConverter.cs
- OperationAbortedException.cs
- ScrollBar.cs
- PersistenceMetadataNamespace.cs
- SoapAttributeAttribute.cs
- CommandLineParser.cs
- DbConnectionInternal.cs
- FixedHyperLink.cs
- DefinitionBase.cs
- IconBitmapDecoder.cs
- DataGridViewLinkCell.cs
- LicenseException.cs
- PackageDigitalSignatureManager.cs
- ResolveResponseInfo.cs
- UserControlDocumentDesigner.cs
- PolicyChain.cs
- OleDbPermission.cs
- GradientStopCollection.cs
- ExecutionEngineException.cs
- CounterCreationData.cs
- Helpers.cs
- WebContext.cs
- DataSourceConverter.cs
- ListViewInsertEventArgs.cs
- FaultImportOptions.cs
- TextUtf8RawTextWriter.cs
- EntityContainerAssociationSetEnd.cs
- XmlText.cs
- ApplicationSettingsBase.cs
- BamlLocalizer.cs
- PrimitiveSchema.cs
- WindowsAuthenticationEventArgs.cs
- Int16AnimationBase.cs
- ViewCellRelation.cs
- HostProtectionPermission.cs
- XmlNamespaceMapping.cs
- EntityContainer.cs
- DataGridViewRowsRemovedEventArgs.cs
- PersonalizationAdministration.cs
- ControlBuilder.cs
- SafeRegistryHandle.cs
- TraceListeners.cs
- Lease.cs
- login.cs
- SoapExtension.cs
- NullRuntimeConfig.cs
- Hashtable.cs
- DataFieldConverter.cs
- TreeViewCancelEvent.cs