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
- XmlAnyAttributeAttribute.cs
- TemplateParser.cs
- TriState.cs
- Function.cs
- CacheSection.cs
- BulletedListEventArgs.cs
- WindowsAuthenticationModule.cs
- UnsafeNativeMethods.cs
- DetailsViewPagerRow.cs
- ObjectCache.cs
- Semaphore.cs
- SmiRecordBuffer.cs
- StringToken.cs
- SchemaImporterExtensionElementCollection.cs
- FrameworkReadOnlyPropertyMetadata.cs
- Timeline.cs
- TextSpan.cs
- linebase.cs
- AndCondition.cs
- XmlSerializationReader.cs
- InputMethod.cs
- CrossContextChannel.cs
- HostVisual.cs
- RegexNode.cs
- OracleMonthSpan.cs
- SqlDependency.cs
- PipelineDeploymentState.cs
- ValuePatternIdentifiers.cs
- QueryReaderSettings.cs
- HandlerWithFactory.cs
- GetPageNumberCompletedEventArgs.cs
- XmlElementCollection.cs
- TerminatorSinks.cs
- PackageStore.cs
- MetadataCache.cs
- StrokeRenderer.cs
- odbcmetadatacolumnnames.cs
- PathFigureCollection.cs
- Point4D.cs
- NTAccount.cs
- TextSelectionHelper.cs
- MachineKeySection.cs
- BasicBrowserDialog.designer.cs
- IssuanceLicense.cs
- WmlFormAdapter.cs
- TabControlAutomationPeer.cs
- ExceptionValidationRule.cs
- GregorianCalendarHelper.cs
- WebPartUtil.cs
- HashRepartitionEnumerator.cs
- ReflectionTypeLoadException.cs
- ObjectDataSourceMethodEditor.cs
- DSASignatureFormatter.cs
- GACIdentityPermission.cs
- Number.cs
- EditorPart.cs
- sqlmetadatafactory.cs
- DataStorage.cs
- XmlWriterSettings.cs
- EpmSyndicationContentSerializer.cs
- OleDbEnumerator.cs
- X509ChainPolicy.cs
- ConfigurationLocation.cs
- GridItemPattern.cs
- Vars.cs
- ConnectionString.cs
- ScriptModule.cs
- WorkflowViewService.cs
- Shape.cs
- MouseActionConverter.cs
- SqlMethodTransformer.cs
- BooleanExpr.cs
- MeasureItemEvent.cs
- HttpCookie.cs
- DataChangedEventManager.cs
- LassoHelper.cs
- InternalTypeHelper.cs
- ProtocolsConfigurationHandler.cs
- DataGridColumnHeadersPresenter.cs
- TypeEnumerableViewSchema.cs
- DigestTraceRecordHelper.cs
- SpellerHighlightLayer.cs
- WindowsScrollBarBits.cs
- Directory.cs
- FixedPageStructure.cs
- HttpListenerRequest.cs
- RemotingServices.cs
- ZoneButton.cs
- NavigationExpr.cs
- ValueChangedEventManager.cs
- BuiltInExpr.cs
- DocumentGrid.cs
- Control.cs
- CounterSetInstanceCounterDataSet.cs
- XmlSchemaSimpleTypeList.cs
- Int64Converter.cs
- ControlDesigner.cs
- AssemblyAttributesGoHere.cs
- QilTargetType.cs
- FileIOPermission.cs