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
- DoubleUtil.cs
- SocketAddress.cs
- NameTable.cs
- ToolboxBitmapAttribute.cs
- CatalogZone.cs
- DataGridViewHeaderCell.cs
- ComEventsInfo.cs
- HashMembershipCondition.cs
- WorkflowQueue.cs
- TextEditorParagraphs.cs
- SimplePropertyEntry.cs
- DataServiceQueryException.cs
- ArgumentOutOfRangeException.cs
- DataGridViewSelectedRowCollection.cs
- CreateParams.cs
- SafeProcessHandle.cs
- StrokeCollection.cs
- ArraySortHelper.cs
- EntryPointNotFoundException.cs
- XamlTypeMapperSchemaContext.cs
- ConfigurationValues.cs
- ComponentRenameEvent.cs
- AncestorChangedEventArgs.cs
- GlyphCache.cs
- WebControlsSection.cs
- Script.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- Trace.cs
- smtpconnection.cs
- ContextBase.cs
- dataprotectionpermission.cs
- EpmSourceTree.cs
- precedingsibling.cs
- PolygonHotSpot.cs
- ApplicationHost.cs
- AgileSafeNativeMemoryHandle.cs
- JulianCalendar.cs
- WebPartConnectionsConfigureVerb.cs
- ScrollViewer.cs
- RectAnimationBase.cs
- EnterpriseServicesHelper.cs
- PolicyStatement.cs
- Task.cs
- JsonDeserializer.cs
- ErrorLog.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- SystemPens.cs
- UIElementPropertyUndoUnit.cs
- UriSectionData.cs
- AnchoredBlock.cs
- DropSource.cs
- ComNativeDescriptor.cs
- UnaryOperationBinder.cs
- ConstNode.cs
- ComponentEvent.cs
- SchemaImporterExtensionElementCollection.cs
- CodeDirectionExpression.cs
- MDIControlStrip.cs
- StructuredTypeEmitter.cs
- VirtualizingStackPanel.cs
- MemberListBinding.cs
- SendKeys.cs
- TraceSource.cs
- ServiceBusyException.cs
- MenuItem.cs
- XLinq.cs
- PointIndependentAnimationStorage.cs
- ModuleBuilder.cs
- PreservationFileReader.cs
- DataColumnMapping.cs
- Query.cs
- SqlWebEventProvider.cs
- TransactionFlowBindingElement.cs
- BridgeDataReader.cs
- QilUnary.cs
- WindowInteropHelper.cs
- Vector3DAnimation.cs
- UseManagedPresentationBindingElementImporter.cs
- XPathArrayIterator.cs
- InvokeHandlers.cs
- TraceLevelStore.cs
- Size3DConverter.cs
- _ListenerResponseStream.cs
- TabPanel.cs
- CustomCredentialPolicy.cs
- UIElementAutomationPeer.cs
- ArraySortHelper.cs
- VisualBasicReference.cs
- AutoResizedEvent.cs
- Content.cs
- XmlWriterTraceListener.cs
- FormViewCommandEventArgs.cs
- SourceInterpreter.cs
- FastPropertyAccessor.cs
- AnimatedTypeHelpers.cs
- ConfigurationValidatorBase.cs
- HandlerFactoryCache.cs
- RemoteX509AsymmetricSecurityKey.cs
- MetadataCacheItem.cs
- MemberRelationshipService.cs