Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Stack.cs
- linebase.cs
- XmlDataSourceView.cs
- BypassElement.cs
- SelectionProviderWrapper.cs
- BindingOperations.cs
- XmlSchemaSimpleContent.cs
- SHA384.cs
- SqlClientMetaDataCollectionNames.cs
- DataGridViewRowConverter.cs
- StorageAssociationSetMapping.cs
- ListParaClient.cs
- ObjectDataSourceFilteringEventArgs.cs
- DesignerMetadata.cs
- PrefixQName.cs
- EmptyControlCollection.cs
- CodeLabeledStatement.cs
- _SslStream.cs
- ObjectAnimationBase.cs
- KoreanCalendar.cs
- DataGridViewLinkColumn.cs
- ControlBuilderAttribute.cs
- SystemIPv6InterfaceProperties.cs
- RewritingValidator.cs
- ListViewSortEventArgs.cs
- CorrelationResolver.cs
- TemplateBamlRecordReader.cs
- PerformanceCounterPermissionEntry.cs
- RowUpdatedEventArgs.cs
- Slider.cs
- WebPartHelpVerb.cs
- XmlComment.cs
- Native.cs
- Atom10FormatterFactory.cs
- ConfigXmlCDataSection.cs
- WebPartConnectionsCancelEventArgs.cs
- StickyNoteAnnotations.cs
- TransformGroup.cs
- CompiledAction.cs
- VirtualDirectoryMapping.cs
- MetabaseServerConfig.cs
- XmlSchemaImport.cs
- PeerNameRegistration.cs
- ConvertEvent.cs
- RegexCompilationInfo.cs
- WCFServiceClientProxyGenerator.cs
- DiscreteKeyFrames.cs
- LinkedResource.cs
- EncoderReplacementFallback.cs
- EmptyControlCollection.cs
- EntitySet.cs
- SafeCryptHandles.cs
- SymbolPair.cs
- RankException.cs
- ChangePasswordDesigner.cs
- ResourceExpression.cs
- SectionRecord.cs
- GroupBox.cs
- ProtocolsConfigurationEntry.cs
- HttpGetServerProtocol.cs
- SignedInfo.cs
- XDRSchema.cs
- Selection.cs
- AttributeData.cs
- AsyncWaitHandle.cs
- EventManager.cs
- XmlCDATASection.cs
- ColumnCollection.cs
- sqlpipe.cs
- RefreshEventArgs.cs
- ImageMetadata.cs
- DependencyPropertyValueSerializer.cs
- CacheChildrenQuery.cs
- ProtocolsConfiguration.cs
- CodeDirectoryCompiler.cs
- DeploymentExceptionMapper.cs
- ConfigXmlCDataSection.cs
- ConstrainedDataObject.cs
- MessageSmuggler.cs
- ArglessEventHandlerProxy.cs
- DataGridRowHeaderAutomationPeer.cs
- Input.cs
- TagPrefixAttribute.cs
- _SecureChannel.cs
- ParentUndoUnit.cs
- XamlSerializerUtil.cs
- GridItem.cs
- TemplateColumn.cs
- ObjectContextServiceProvider.cs
- RemoteArgument.cs
- BaseConfigurationRecord.cs
- LogicalExpr.cs
- XmlSchemaSet.cs
- DataBinder.cs
- JsonByteArrayDataContract.cs
- ElementProxy.cs
- ValidationError.cs
- MaterialGroup.cs
- ConfigurationPropertyCollection.cs
- TraceInternal.cs