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
- TextRangeAdaptor.cs
- COM2ExtendedTypeConverter.cs
- DataGridViewMethods.cs
- Splitter.cs
- ClientSettingsStore.cs
- SerialStream.cs
- BinaryParser.cs
- NullReferenceException.cs
- DataBinding.cs
- BaseTemplateParser.cs
- ExclusiveCanonicalizationTransform.cs
- Style.cs
- DataTableReaderListener.cs
- SecurityValidationBehavior.cs
- SQLRoleProvider.cs
- CommandPlan.cs
- Quaternion.cs
- ListSortDescription.cs
- CodeDOMUtility.cs
- ResourceAssociationTypeEnd.cs
- SecureEnvironment.cs
- AttachedAnnotation.cs
- UnmanagedMemoryStream.cs
- ClientTarget.cs
- SQLConvert.cs
- __Filters.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- PropertyKey.cs
- RSACryptoServiceProvider.cs
- DateTimePickerDesigner.cs
- SecurityAlgorithmSuiteConverter.cs
- PublishLicense.cs
- PixelFormats.cs
- AccessedThroughPropertyAttribute.cs
- GenericEnumConverter.cs
- MessageQueueInstaller.cs
- FlowLayoutPanel.cs
- ParameterCollection.cs
- RtfFormatStack.cs
- ValidatedControlConverter.cs
- TriggerAction.cs
- ServicePoint.cs
- ToolStripItemRenderEventArgs.cs
- QueryStringHandler.cs
- LiteralLink.cs
- CachedPathData.cs
- DataViewSettingCollection.cs
- AdapterUtil.cs
- CounterNameConverter.cs
- GACIdentityPermission.cs
- CanonicalXml.cs
- Array.cs
- TabletDevice.cs
- TogglePattern.cs
- SRDisplayNameAttribute.cs
- TemplateField.cs
- ConfigurationManagerInternal.cs
- RSACryptoServiceProvider.cs
- PointCollectionConverter.cs
- DecoderReplacementFallback.cs
- UnsafeNativeMethods.cs
- WorkflowMarkupSerializationException.cs
- TCPListener.cs
- EtwTrace.cs
- CheckedListBox.cs
- DecimalConstantAttribute.cs
- TemplateParser.cs
- KeyboardDevice.cs
- CodeVariableDeclarationStatement.cs
- CodeTypeConstructor.cs
- iisPickupDirectory.cs
- Inflater.cs
- RsaSecurityKey.cs
- TextBox.cs
- XmlDocumentFragment.cs
- PerfService.cs
- FontFamilyValueSerializer.cs
- CustomCredentialPolicy.cs
- AbstractExpressions.cs
- EntityKeyElement.cs
- UrlMapping.cs
- FileDialog.cs
- EditingCoordinator.cs
- codemethodreferenceexpression.cs
- ClockController.cs
- MemoryRecordBuffer.cs
- PropertyEntry.cs
- DetailsViewCommandEventArgs.cs
- HtmlString.cs
- WebBrowserSiteBase.cs
- Grant.cs
- MetabaseServerConfig.cs
- WarningException.cs
- BufferedGraphicsContext.cs
- Point4DConverter.cs
- EntityClientCacheEntry.cs
- MarginCollapsingState.cs
- Attributes.cs
- Matrix.cs
- _SafeNetHandles.cs