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
- WizardPanelChangingEventArgs.cs
- PageAsyncTask.cs
- ThreadExceptionEvent.cs
- CustomValidator.cs
- LoadMessageLogger.cs
- SecurityDescriptor.cs
- RectangleHotSpot.cs
- NegotiateStream.cs
- AutomationTextAttribute.cs
- DayRenderEvent.cs
- oledbmetadatacolumnnames.cs
- CancelEventArgs.cs
- EmptyImpersonationContext.cs
- WebPartEditorCancelVerb.cs
- PropertyPathConverter.cs
- InfiniteIntConverter.cs
- MaskedTextBoxDesignerActionList.cs
- ListViewItem.cs
- SmtpFailedRecipientException.cs
- InvalidPrinterException.cs
- CommandValueSerializer.cs
- TrustDriver.cs
- ParseChildrenAsPropertiesAttribute.cs
- AdornedElementPlaceholder.cs
- SignatureDescription.cs
- LogLogRecord.cs
- DefaultParameterValueAttribute.cs
- CodeCompileUnit.cs
- HWStack.cs
- CalendarModeChangedEventArgs.cs
- HwndSubclass.cs
- DataGridViewDesigner.cs
- PrintDialog.cs
- DrawListViewItemEventArgs.cs
- BitmapEffectInput.cs
- EventLogPermissionEntry.cs
- SqlTriggerAttribute.cs
- SweepDirectionValidation.cs
- VisualStyleElement.cs
- ThreadStateException.cs
- TdsRecordBufferSetter.cs
- ConversionValidationRule.cs
- TrackingWorkflowEventArgs.cs
- OleAutBinder.cs
- UnaryNode.cs
- ContentElement.cs
- AppDomainFactory.cs
- InspectionWorker.cs
- EntityEntry.cs
- UriParserTemplates.cs
- WorkItem.cs
- XmlBaseReader.cs
- PageThemeParser.cs
- Matrix.cs
- EventHandlersStore.cs
- ReplacementText.cs
- Int64Converter.cs
- ClientRoleProvider.cs
- PersonalizationEntry.cs
- RowToFieldTransformer.cs
- EntityDesignerUtils.cs
- ScriptDescriptor.cs
- GridViewRowCollection.cs
- columnmapkeybuilder.cs
- DataException.cs
- FixedSOMTextRun.cs
- Ops.cs
- TableChangeProcessor.cs
- GuidConverter.cs
- ButtonFieldBase.cs
- storepermissionattribute.cs
- WorkflowRuntimeServiceElement.cs
- SmtpMail.cs
- ParallelDesigner.cs
- XPathNavigator.cs
- ContentHostHelper.cs
- ReadOnlyTernaryTree.cs
- BezierSegment.cs
- ReadOnlyActivityGlyph.cs
- DataSet.cs
- BinaryObjectInfo.cs
- Matrix.cs
- PublisherIdentityPermission.cs
- ViewBase.cs
- ConversionValidationRule.cs
- FlowDocumentReader.cs
- SectionXmlInfo.cs
- RectangleGeometry.cs
- Rfc4050KeyFormatter.cs
- FolderBrowserDialogDesigner.cs
- NumericPagerField.cs
- PropertyChangeTracker.cs
- TextUtf8RawTextWriter.cs
- EntityDataSourceValidationException.cs
- DictionarySectionHandler.cs
- PropertyPath.cs
- TypographyProperties.cs
- SevenBitStream.cs
- AttributeAction.cs
- ProtocolState.cs