Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / LookupBindingPropertiesAttribute.cs / 1 / LookupBindingPropertiesAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies the data source and data member properties for a component.
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class LookupBindingPropertiesAttribute : Attribute {
private readonly string dataSource;
private readonly string displayMember;
private readonly string valueMember;
private readonly string lookupMember;
///
///
/// Initializes a new instance of
/// the class.
///
///
public LookupBindingPropertiesAttribute() {
this.dataSource = null;
this.displayMember = null;
this.valueMember = null;
this.lookupMember = null;
}
///
///
/// Initializes a new instance of
/// the class.
///
///
public LookupBindingPropertiesAttribute(string dataSource, string displayMember, string valueMember, string lookupMember) {
this.dataSource = dataSource;
this.displayMember = displayMember;
this.valueMember = valueMember;
this.lookupMember = lookupMember;
}
///
///
/// Gets the name of the data source property for the component this attribute is
/// bound to.
///
///
public string DataSource {
get {
return dataSource;
}
}
///
///
/// Gets the name of the display member property for the component this attribute is
/// bound to.
///
///
public string DisplayMember {
get {
return displayMember;
}
}
///
///
/// Gets the name of the value member property for the component this attribute is
/// bound to.
///
///
public string ValueMember {
get {
return valueMember;
}
}
///
///
/// Gets the name of the member property for the component this attribute is
/// bound to.
///
///
public string LookupMember {
get {
return lookupMember;
}
}
///
///
/// Specifies the default value for the , which is . This
/// field is read-only.
///
///
public static readonly LookupBindingPropertiesAttribute Default = new LookupBindingPropertiesAttribute();
public override bool Equals(object obj) {
LookupBindingPropertiesAttribute other = obj as LookupBindingPropertiesAttribute;
return other != null &&
other.DataSource == dataSource &&
other.displayMember == displayMember &&
other.valueMember == valueMember &&
other.lookupMember == lookupMember;
}
public override int GetHashCode() {
return base.GetHashCode();
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NGCUIElementCollectionSerializerAsync.cs
- XmlSerializerNamespaces.cs
- HttpStreamMessageEncoderFactory.cs
- CreateParams.cs
- RowCache.cs
- EditorPartCollection.cs
- MetaModel.cs
- SynchronousChannelMergeEnumerator.cs
- ImageDrawing.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- IdentityValidationException.cs
- RenderDataDrawingContext.cs
- MexHttpBindingCollectionElement.cs
- TextDpi.cs
- MeasureData.cs
- RealizedColumnsBlock.cs
- ExpressionVisitorHelpers.cs
- HttpClientCredentialType.cs
- CreateParams.cs
- CustomPopupPlacement.cs
- ApplicationContext.cs
- FastEncoderWindow.cs
- XmlMemberMapping.cs
- SqlBulkCopy.cs
- SqlDataReader.cs
- CardSpacePolicyElement.cs
- FtpWebResponse.cs
- EnumValAlphaComparer.cs
- LineUtil.cs
- HttpProfileGroupBase.cs
- StorageConditionPropertyMapping.cs
- PromptStyle.cs
- BindingManagerDataErrorEventArgs.cs
- XmlSchemaSimpleType.cs
- XmlSchemaInfo.cs
- XmlDictionaryReader.cs
- ZipIOExtraFieldPaddingElement.cs
- Trace.cs
- SmiMetaDataProperty.cs
- DesignTableCollection.cs
- DomNameTable.cs
- ClientUIRequest.cs
- CultureSpecificCharacterBufferRange.cs
- StaticContext.cs
- DurableErrorHandler.cs
- CompiledRegexRunnerFactory.cs
- RichTextBoxConstants.cs
- FixedSchema.cs
- _LocalDataStore.cs
- formatter.cs
- PersianCalendar.cs
- XhtmlBasicTextBoxAdapter.cs
- SequentialOutput.cs
- ToolStripRenderer.cs
- FigureParagraph.cs
- AnimationClockResource.cs
- BoundColumn.cs
- TCPListener.cs
- DispatcherExceptionEventArgs.cs
- TransformerInfo.cs
- RoutedEventConverter.cs
- ReliableChannelBinder.cs
- CacheChildrenQuery.cs
- MappableObjectManager.cs
- TemplateNameScope.cs
- DesignUtil.cs
- ItemAutomationPeer.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ObjRef.cs
- PictureBox.cs
- TextRunTypographyProperties.cs
- Ref.cs
- CodeLinePragma.cs
- KeyConverter.cs
- LocalBuilder.cs
- PerformanceCounterPermissionEntryCollection.cs
- StandardMenuStripVerb.cs
- ToolboxDataAttribute.cs
- CodeArrayCreateExpression.cs
- GcHandle.cs
- ActiveXContainer.cs
- Int32AnimationBase.cs
- MediaTimeline.cs
- WpfGeneratedKnownProperties.cs
- ChannelSinkStacks.cs
- UInt32Converter.cs
- DataTrigger.cs
- _DomainName.cs
- ToolBarButtonClickEvent.cs
- SiteMapProvider.cs
- ConstructorBuilder.cs
- ContentElement.cs
- XmlLinkedNode.cs
- EdmProviderManifest.cs
- SingleConverter.cs
- cookieexception.cs
- EntityProviderServices.cs
- DataGridViewMethods.cs
- AvTraceDetails.cs
- TimeoutValidationAttribute.cs