Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / DataKeyPropertyAttribute.cs / 1305376 / DataKeyPropertyAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
using System.Web.Util;
using System.Diagnostics.CodeAnalysis;
[AttributeUsage(AttributeTargets.Class)]
public sealed class DataKeyPropertyAttribute : Attribute {
private readonly string _name;
public DataKeyPropertyAttribute(string name) {
_name = name;
}
public string Name {
get {
return _name;
}
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
public override bool Equals(object obj) {
DataKeyPropertyAttribute other = obj as DataKeyPropertyAttribute;
if (other != null) {
return String.Equals(_name, other.Name, StringComparison.Ordinal);
}
return false;
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
public override int GetHashCode() {
return (Name != null) ? Name.GetHashCode() : 0;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
using System.Web.Util;
using System.Diagnostics.CodeAnalysis;
[AttributeUsage(AttributeTargets.Class)]
public sealed class DataKeyPropertyAttribute : Attribute {
private readonly string _name;
public DataKeyPropertyAttribute(string name) {
_name = name;
}
public string Name {
get {
return _name;
}
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
public override bool Equals(object obj) {
DataKeyPropertyAttribute other = obj as DataKeyPropertyAttribute;
if (other != null) {
return String.Equals(_name, other.Name, StringComparison.Ordinal);
}
return false;
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
public override int GetHashCode() {
return (Name != null) ? Name.GetHashCode() : 0;
}
}
}
// 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
- CodeParameterDeclarationExpression.cs
- StylusDevice.cs
- StringCollectionMarkupSerializer.cs
- ConfigurationLocationCollection.cs
- EmptyStringExpandableObjectConverter.cs
- externdll.cs
- DispatcherExceptionFilterEventArgs.cs
- CultureInfoConverter.cs
- StorageComplexTypeMapping.cs
- EncodingTable.cs
- DispatcherHookEventArgs.cs
- contentDescriptor.cs
- SafeHandle.cs
- RectAnimationBase.cs
- ToolStripSplitStackLayout.cs
- DynamicField.cs
- HtmlControlDesigner.cs
- SvcMapFileLoader.cs
- StaticSiteMapProvider.cs
- CategoriesDocument.cs
- SafeProcessHandle.cs
- TextAdaptor.cs
- WorkflowEnvironment.cs
- DataGridItemCollection.cs
- Selection.cs
- SecurityDescriptor.cs
- DropShadowEffect.cs
- WpfWebRequestHelper.cs
- ChtmlLinkAdapter.cs
- OdbcConnection.cs
- Rotation3DAnimationUsingKeyFrames.cs
- UpdatePanel.cs
- KeyboardNavigation.cs
- ImageAutomationPeer.cs
- keycontainerpermission.cs
- GridViewDeleteEventArgs.cs
- CertificateElement.cs
- ListViewTableCell.cs
- XhtmlConformanceSection.cs
- SmtpFailedRecipientException.cs
- CodeMemberField.cs
- ConfigurationConverterBase.cs
- SpotLight.cs
- GridViewSelectEventArgs.cs
- TextRunProperties.cs
- PublisherIdentityPermission.cs
- TemplateControlCodeDomTreeGenerator.cs
- IriParsingElement.cs
- CommandHelpers.cs
- LinqDataSourceHelper.cs
- ComboBox.cs
- ListViewDeletedEventArgs.cs
- ExpressionPrinter.cs
- GlyphTypeface.cs
- PLINQETWProvider.cs
- WindowsAuthenticationEventArgs.cs
- FlowDocumentPaginator.cs
- WindowProviderWrapper.cs
- DataGridLinkButton.cs
- StsCommunicationException.cs
- SecurityTimestamp.cs
- NonParentingControl.cs
- DataGridViewCellParsingEventArgs.cs
- XmlQueryRuntime.cs
- SqlDataRecord.cs
- CompilerParameters.cs
- CommentGlyph.cs
- EncodingDataItem.cs
- RelatedView.cs
- SimpleApplicationHost.cs
- BindingsCollection.cs
- RoleServiceManager.cs
- DataGridColumnFloatingHeader.cs
- StorageAssociationTypeMapping.cs
- HuffmanTree.cs
- LinkButton.cs
- SourceElementsCollection.cs
- DSGeneratorProblem.cs
- RegexGroup.cs
- CompilerInfo.cs
- Int32Storage.cs
- Sql8ConformanceChecker.cs
- XmlDocumentSurrogate.cs
- SynchronousSendBindingElement.cs
- AppliedDeviceFiltersEditor.cs
- SecurityMode.cs
- AuthenticationServiceManager.cs
- SessionStateUtil.cs
- IntranetCredentialPolicy.cs
- DropSource.cs
- SiteMapDataSourceDesigner.cs
- UnsafePeerToPeerMethods.cs
- Quad.cs
- WmlListAdapter.cs
- PersianCalendar.cs
- LicenseProviderAttribute.cs
- EventProxy.cs
- RangeValueProviderWrapper.cs
- RuntimeWrappedException.cs
- DropShadowEffect.cs