Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MessageBox.cs
- ConvertersCollection.cs
- SessionStateContainer.cs
- UndoUnit.cs
- ObjectFullSpanRewriter.cs
- SecureConversationSecurityTokenParameters.cs
- BitmapEffectInputData.cs
- SqlBooleanizer.cs
- XmlHelper.cs
- BindingNavigator.cs
- TargetControlTypeAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- CompleteWizardStep.cs
- LZCodec.cs
- Storyboard.cs
- XmlSerializerSection.cs
- Propagator.Evaluator.cs
- BoundPropertyEntry.cs
- DownloadProgressEventArgs.cs
- SchemaImporterExtensionElement.cs
- UpdateCompiler.cs
- ColumnMapVisitor.cs
- OleDbParameterCollection.cs
- InteropAutomationProvider.cs
- InheritedPropertyChangedEventArgs.cs
- TcpStreams.cs
- GeometryGroup.cs
- DataSetMappper.cs
- OutputCacheSettingsSection.cs
- PointAnimationClockResource.cs
- AuthorizationContext.cs
- VerticalAlignConverter.cs
- DataGridViewImageCell.cs
- WebHostedComPlusServiceHost.cs
- _HTTPDateParse.cs
- DesignerAdapterUtil.cs
- StateRuntime.cs
- RubberbandSelector.cs
- TableCell.cs
- NegationPusher.cs
- ClientBuildManagerCallback.cs
- Int32Rect.cs
- ImageListUtils.cs
- FileEnumerator.cs
- OleDbFactory.cs
- IfAction.cs
- XslNumber.cs
- StorageComplexPropertyMapping.cs
- PositiveTimeSpanValidator.cs
- WSDualHttpSecurity.cs
- TextViewSelectionProcessor.cs
- ExpressionList.cs
- ScrollEvent.cs
- BaseConfigurationRecord.cs
- GacUtil.cs
- XmlObjectSerializerContext.cs
- QilFactory.cs
- ResourceDescriptionAttribute.cs
- WaitHandle.cs
- WrappedDispatcherException.cs
- ThicknessAnimation.cs
- SiteMembershipCondition.cs
- DragStartedEventArgs.cs
- CompareInfo.cs
- RegexBoyerMoore.cs
- ClientBuildManager.cs
- Literal.cs
- XmlAggregates.cs
- log.cs
- GroupPartitionExpr.cs
- UrlAuthFailedErrorFormatter.cs
- TraceSection.cs
- Maps.cs
- XmlParserContext.cs
- Setter.cs
- ExpressionEditor.cs
- UnsafeNativeMethods.cs
- InstanceContextMode.cs
- cryptoapiTransform.cs
- ClusterRegistryConfigurationProvider.cs
- DoubleStorage.cs
- DataGridRow.cs
- ConfigurationLockCollection.cs
- DataError.cs
- ControlBuilder.cs
- GrammarBuilderPhrase.cs
- BinaryObjectInfo.cs
- SynchronizationScope.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ToolTipService.cs
- GrammarBuilderWildcard.cs
- ScrollProviderWrapper.cs
- BlobPersonalizationState.cs
- CustomSignedXml.cs
- RunInstallerAttribute.cs
- StatusBar.cs
- AuthenticationModuleElementCollection.cs
- RayMeshGeometry3DHitTestResult.cs
- HttpEncoderUtility.cs
- ArrayElementGridEntry.cs