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
- Point4D.cs
- URLIdentityPermission.cs
- MenuItemCollection.cs
- VerticalAlignConverter.cs
- MaskInputRejectedEventArgs.cs
- SpeechAudioFormatInfo.cs
- TdsValueSetter.cs
- ServiceReference.cs
- GenerateTemporaryTargetAssembly.cs
- SelectedGridItemChangedEvent.cs
- RectConverter.cs
- ChangeConflicts.cs
- SiteMapProvider.cs
- ClientSettingsStore.cs
- Code.cs
- ProviderConnectionPointCollection.cs
- StackSpiller.Temps.cs
- TrustSection.cs
- TaskExceptionHolder.cs
- Stackframe.cs
- DoubleAverageAggregationOperator.cs
- SiteMapPath.cs
- ConditionalAttribute.cs
- EdmTypeAttribute.cs
- LineGeometry.cs
- RequestCacheManager.cs
- Attributes.cs
- KeyNotFoundException.cs
- HostProtectionPermission.cs
- HttpDictionary.cs
- DateTimeEditor.cs
- UnsafeNativeMethods.cs
- Header.cs
- DefaultPrintController.cs
- OptionUsage.cs
- EntityDataSourceContextDisposingEventArgs.cs
- SQLString.cs
- AttributeTable.cs
- infer.cs
- SchemaInfo.cs
- LocalFileSettingsProvider.cs
- FieldAccessException.cs
- RuleEngine.cs
- ApplicationManager.cs
- Validator.cs
- Vertex.cs
- FunctionNode.cs
- CdpEqualityComparer.cs
- NumberAction.cs
- ParenthesizePropertyNameAttribute.cs
- ArrangedElementCollection.cs
- DirectionalLight.cs
- SqlRowUpdatingEvent.cs
- X509IssuerSerialKeyIdentifierClause.cs
- SqlRetyper.cs
- ReceiveActivityDesignerTheme.cs
- ToolStripRenderer.cs
- MergePropertyDescriptor.cs
- EDesignUtil.cs
- SettingsPropertyNotFoundException.cs
- CodeBlockBuilder.cs
- InputReportEventArgs.cs
- HttpCookiesSection.cs
- RIPEMD160Managed.cs
- DropDownList.cs
- HostedHttpTransportManager.cs
- AssemblyResourceLoader.cs
- PenContext.cs
- SessionPageStateSection.cs
- DataGridViewRowsAddedEventArgs.cs
- Rotation3D.cs
- PiiTraceSource.cs
- XmlSchemaGroup.cs
- SectionRecord.cs
- FragmentQueryKB.cs
- NetMsmqSecurity.cs
- TemplateKey.cs
- SettingsPropertyWrongTypeException.cs
- GridViewSortEventArgs.cs
- XmlCharacterData.cs
- XmlEncodedRawTextWriter.cs
- WindowsListViewGroupSubsetLink.cs
- ListChangedEventArgs.cs
- ControlParameter.cs
- dataSvcMapFileLoader.cs
- MessageEnumerator.cs
- RequestValidator.cs
- PrivacyNoticeElement.cs
- WindowsMenu.cs
- WsdlContractConversionContext.cs
- TableLayoutStyleCollection.cs
- ExtractCollection.cs
- CurrentChangedEventManager.cs
- Point3DConverter.cs
- Zone.cs
- SmiMetaData.cs
- DataBindingExpressionBuilder.cs
- Trigger.cs
- DataControlImageButton.cs
- PropertyInfo.cs