Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / LookupBindingPropertiesAttribute.cs / 1305376 / 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();
}
}
}
// 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
- HierarchicalDataTemplate.cs
- DelegatingConfigHost.cs
- HijriCalendar.cs
- WebUtil.cs
- QuaternionConverter.cs
- VirtualPath.cs
- ExportOptions.cs
- EdmTypeAttribute.cs
- RowsCopiedEventArgs.cs
- XmlSchemaChoice.cs
- ScriptComponentDescriptor.cs
- ProcessHostMapPath.cs
- ProfileProvider.cs
- DataGridViewImageColumn.cs
- RemoteWebConfigurationHost.cs
- RealProxy.cs
- ProcessModelInfo.cs
- BaseTemplateBuildProvider.cs
- RuleSettings.cs
- CLSCompliantAttribute.cs
- ChannelSinkStacks.cs
- SystemColors.cs
- QuotedPrintableStream.cs
- ObjectParameterCollection.cs
- WebPartEditorCancelVerb.cs
- ReadOnlyCollectionBase.cs
- VolatileEnlistmentMultiplexing.cs
- SystemThemeKey.cs
- TreeWalkHelper.cs
- StateItem.cs
- QuaternionAnimationBase.cs
- ItemType.cs
- DbConnectionHelper.cs
- WinFormsUtils.cs
- TextSearch.cs
- BoolExpression.cs
- ServiceMemoryGates.cs
- XPathSelfQuery.cs
- DataBoundControl.cs
- CatalogZoneBase.cs
- AndCondition.cs
- X509Certificate2.cs
- System.Data.OracleClient_BID.cs
- VirtualPathProvider.cs
- CodeAssignStatement.cs
- ItemContainerPattern.cs
- CodeDomSerializer.cs
- SchemaImporterExtensionsSection.cs
- ComplexPropertyEntry.cs
- CopyAction.cs
- InvalidDataException.cs
- CLSCompliantAttribute.cs
- RowType.cs
- XmlJsonReader.cs
- CodeDelegateInvokeExpression.cs
- DiagnosticTrace.cs
- WindowsAuthenticationEventArgs.cs
- DrawingContextDrawingContextWalker.cs
- Point3DAnimationUsingKeyFrames.cs
- HtmlToClrEventProxy.cs
- CanonicalizationDriver.cs
- Pair.cs
- TabPage.cs
- EndpointDiscoveryBehavior.cs
- ClientScriptItemCollection.cs
- PeerCustomResolverBindingElement.cs
- DataListItemEventArgs.cs
- ExtensionSimplifierMarkupObject.cs
- Mouse.cs
- ThicknessConverter.cs
- XomlCompilerError.cs
- SignatureDescription.cs
- OperationInvokerBehavior.cs
- PassportAuthenticationModule.cs
- ConvertersCollection.cs
- Rule.cs
- HttpConfigurationContext.cs
- SqlInternalConnectionTds.cs
- OSFeature.cs
- PageContentAsyncResult.cs
- UnauthorizedWebPart.cs
- NullReferenceException.cs
- GroupItem.cs
- RuntimeHelpers.cs
- CodeSubDirectory.cs
- HttpRequestCacheValidator.cs
- TextBoxBase.cs
- ArrayExtension.cs
- ComEventsInfo.cs
- HandlerMappingMemo.cs
- JsonServiceDocumentSerializer.cs
- HorizontalAlignConverter.cs
- PageAsyncTask.cs
- PropertyIDSet.cs
- FileDialog_Vista_Interop.cs
- HealthMonitoringSectionHelper.cs
- XamlClipboardData.cs
- WinInet.cs
- ScaleTransform3D.cs
- activationcontext.cs