Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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();
}
}
}
// 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.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
- XsltLoader.cs
- Double.cs
- _NetRes.cs
- ResourceCategoryAttribute.cs
- ResXResourceReader.cs
- MappingModelBuildProvider.cs
- BreakRecordTable.cs
- BinaryMethodMessage.cs
- XmlBindingWorker.cs
- Wildcard.cs
- CompiledQuery.cs
- WsdlInspector.cs
- BoundPropertyEntry.cs
- StylusPointProperty.cs
- XsltException.cs
- InfoCardRSACryptoProvider.cs
- MatrixTransform.cs
- ComponentSerializationService.cs
- TextDecoration.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- ServiceDescriptionData.cs
- TextEditorCopyPaste.cs
- MultiSelector.cs
- ToolStripDropDownClosedEventArgs.cs
- DataServiceQueryException.cs
- BridgeDataRecord.cs
- DiscreteKeyFrames.cs
- PerformanceCounterLib.cs
- DataGridHyperlinkColumn.cs
- BinaryFormatterSinks.cs
- WebBaseEventKeyComparer.cs
- VisualCollection.cs
- EventDescriptorCollection.cs
- MessageQueueConverter.cs
- FontSource.cs
- CommonDialog.cs
- DefaultObjectMappingItemCollection.cs
- HostingEnvironmentException.cs
- OperationCanceledException.cs
- UIPermission.cs
- CalendarDay.cs
- InputLangChangeEvent.cs
- ItemChangedEventArgs.cs
- HandlerFactoryWrapper.cs
- LocalizationComments.cs
- DataListComponentEditor.cs
- ColorConvertedBitmap.cs
- StructuralCache.cs
- FrameworkContentElementAutomationPeer.cs
- COM2PictureConverter.cs
- EventDescriptorCollection.cs
- Pts.cs
- ConfigurationPermission.cs
- SystemColors.cs
- ResourceDictionaryCollection.cs
- WebReferenceCollection.cs
- FontNamesConverter.cs
- ApplicationId.cs
- NamespaceExpr.cs
- UrlPath.cs
- DbConnectionPoolIdentity.cs
- SpellCheck.cs
- PersonalizationStateQuery.cs
- PolyLineSegmentFigureLogic.cs
- ChannelReliableSession.cs
- XmlLoader.cs
- RSAPKCS1KeyExchangeFormatter.cs
- HtmlInputSubmit.cs
- ResponseBodyWriter.cs
- HighContrastHelper.cs
- SafeRightsManagementEnvironmentHandle.cs
- TabControl.cs
- DataBindingExpressionBuilder.cs
- PatternMatcher.cs
- ObjectDataSourceStatusEventArgs.cs
- MemberInfoSerializationHolder.cs
- PaperSource.cs
- Schema.cs
- CapabilitiesSection.cs
- InfoCardBaseException.cs
- ToolStripStatusLabel.cs
- StringHandle.cs
- ReflectionUtil.cs
- WeakReference.cs
- ProcessModuleCollection.cs
- FormsAuthenticationUser.cs
- SqlException.cs
- FacetDescriptionElement.cs
- RichTextBoxAutomationPeer.cs
- CultureMapper.cs
- _SingleItemRequestCache.cs
- TextTreeInsertElementUndoUnit.cs
- RowVisual.cs
- MethodCallExpression.cs
- AnimationStorage.cs
- HtmlTernaryTree.cs
- DataSetUtil.cs
- AddInAdapter.cs
- UrlAuthorizationModule.cs
- GcHandle.cs