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
- DataColumn.cs
- EditorPart.cs
- ParsedAttributeCollection.cs
- ReadingWritingEntityEventArgs.cs
- TypeConverterHelper.cs
- WebPartDisplayModeCancelEventArgs.cs
- NamedPipeHostedTransportConfiguration.cs
- ToolStripCollectionEditor.cs
- OletxDependentTransaction.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- DelayedRegex.cs
- Geometry3D.cs
- Ray3DHitTestResult.cs
- UdpChannelListener.cs
- StatusBarPanel.cs
- HtmlAnchor.cs
- PointF.cs
- NativeMethods.cs
- VectorCollectionValueSerializer.cs
- RequestStatusBarUpdateEventArgs.cs
- ReadOnlyObservableCollection.cs
- ZipIOExtraFieldElement.cs
- SignedXml.cs
- RelationshipManager.cs
- SynchronizedDisposablePool.cs
- AudioStateChangedEventArgs.cs
- TextSimpleMarkerProperties.cs
- ReachSerializer.cs
- ColumnWidthChangingEvent.cs
- TranslateTransform.cs
- AssemblyInfo.cs
- MetadataArtifactLoaderResource.cs
- ContextMenu.cs
- ServiceDescriptionReflector.cs
- KeyTime.cs
- VisualTarget.cs
- LocalValueEnumerator.cs
- Stack.cs
- HandleCollector.cs
- ValidationResult.cs
- DesignerHelpers.cs
- LinkClickEvent.cs
- TraceContext.cs
- XslUrlEditor.cs
- PathFigureCollectionConverter.cs
- DataPager.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- CellConstantDomain.cs
- XmlUtf8RawTextWriter.cs
- SafeLocalAllocation.cs
- XmlSerializerSection.cs
- CharacterBuffer.cs
- AddInSegmentDirectoryNotFoundException.cs
- Matrix3D.cs
- X509Extension.cs
- PropertyBuilder.cs
- PageAsyncTask.cs
- EmptyEnumerable.cs
- CodePrimitiveExpression.cs
- ResourceDefaultValueAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- DragStartedEventArgs.cs
- GridViewCommandEventArgs.cs
- KnownColorTable.cs
- DockPattern.cs
- TextEditorCopyPaste.cs
- GenericTypeParameterBuilder.cs
- StoreAnnotationsMap.cs
- TemplatePartAttribute.cs
- ExceptionValidationRule.cs
- SizeAnimationUsingKeyFrames.cs
- WinEventWrap.cs
- AdornerPresentationContext.cs
- BamlLocalizer.cs
- ToolStripManager.cs
- ResolveMatchesCD1.cs
- DefaultEventAttribute.cs
- TabPage.cs
- HtmlInputButton.cs
- SqlNodeAnnotations.cs
- QuaternionAnimationBase.cs
- ListenerConnectionDemuxer.cs
- BinaryCommonClasses.cs
- HttpResponseHeader.cs
- WindowVisualStateTracker.cs
- Grid.cs
- LinqDataSource.cs
- X509AudioLogo.cs
- HtmlHead.cs
- ObjectAssociationEndMapping.cs
- MenuScrollingVisibilityConverter.cs
- ImmComposition.cs
- SettingsContext.cs
- UserControlCodeDomTreeGenerator.cs
- SafeWaitHandle.cs
- InvokePatternIdentifiers.cs
- ListBoxItemAutomationPeer.cs
- WorkflowRuntimeSection.cs
- TextFormattingConverter.cs
- LineUtil.cs