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
- EditorZone.cs
- WindowsContainer.cs
- HtmlToClrEventProxy.cs
- RestHandlerFactory.cs
- X509InitiatorCertificateClientElement.cs
- XmlReaderSettings.cs
- AppDomainProtocolHandler.cs
- Scene3D.cs
- XmlSchemaExternal.cs
- RadioButton.cs
- HebrewCalendar.cs
- SqlGatherProducedAliases.cs
- WmfPlaceableFileHeader.cs
- MasterPageCodeDomTreeGenerator.cs
- WebHttpSecurityModeHelper.cs
- DataGridViewCellParsingEventArgs.cs
- CompositeDataBoundControl.cs
- GridItemPatternIdentifiers.cs
- ActivityValidationServices.cs
- AppDomain.cs
- SqlDelegatedTransaction.cs
- DesignerProperties.cs
- FileDataSourceCache.cs
- TextBlockAutomationPeer.cs
- ForwardPositionQuery.cs
- ContainerSelectorBehavior.cs
- ListMarkerLine.cs
- PeerName.cs
- DSASignatureDeformatter.cs
- NetworkInformationPermission.cs
- QueryStringParameter.cs
- CopyAttributesAction.cs
- Asn1IntegerConverter.cs
- SqlCrossApplyToCrossJoin.cs
- DuplexChannel.cs
- HtmlInputCheckBox.cs
- Freezable.cs
- Ticks.cs
- NetCodeGroup.cs
- SymbolEqualComparer.cs
- AncillaryOps.cs
- ParsedAttributeCollection.cs
- DocumentReference.cs
- EditingCommands.cs
- SqlBulkCopyColumnMapping.cs
- StringValueSerializer.cs
- ContactManager.cs
- AutoGeneratedFieldProperties.cs
- ActionMismatchAddressingException.cs
- PathGradientBrush.cs
- IResourceProvider.cs
- ObjectDataSourceView.cs
- FontConverter.cs
- ValidatedControlConverter.cs
- PriorityChain.cs
- DataGridViewMethods.cs
- CompatibleComparer.cs
- SafeWaitHandle.cs
- CodeCatchClause.cs
- TrackingParameters.cs
- QilIterator.cs
- Rights.cs
- SecureEnvironment.cs
- PeerUnsafeNativeCryptMethods.cs
- TextTreeInsertUndoUnit.cs
- AppDomainManager.cs
- ToolStripContentPanelDesigner.cs
- _ContextAwareResult.cs
- ApplicationHost.cs
- HostedBindingBehavior.cs
- CorrelationManager.cs
- RelatedImageListAttribute.cs
- KeyValuePair.cs
- SafeBitVector32.cs
- figurelength.cs
- InputLanguageEventArgs.cs
- SafeFreeMibTable.cs
- keycontainerpermission.cs
- HTMLTagNameToTypeMapper.cs
- DiagnosticsConfigurationHandler.cs
- DeobfuscatingStream.cs
- NativeMethods.cs
- RoleBoolean.cs
- TextDecorationUnitValidation.cs
- SchemaImporterExtensionsSection.cs
- MetaData.cs
- SerializationUtilities.cs
- Overlapped.cs
- DelegateBodyWriter.cs
- CollectionDataContract.cs
- HttpResponse.cs
- WorkerRequest.cs
- XmlDigitalSignatureProcessor.cs
- HostingEnvironmentWrapper.cs
- Membership.cs
- GifBitmapEncoder.cs
- CaseCqlBlock.cs
- mediaclock.cs
- Size3DValueSerializer.cs
- InputScope.cs