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
- FieldDescriptor.cs
- TripleDESCryptoServiceProvider.cs
- ZipIOExtraFieldPaddingElement.cs
- TypedElement.cs
- IList.cs
- SimplePropertyEntry.cs
- Drawing.cs
- _MultipleConnectAsync.cs
- PopupControlService.cs
- EventHandlers.cs
- EncryptedType.cs
- BezierSegment.cs
- RuntimeWrappedException.cs
- bidPrivateBase.cs
- NavigationFailedEventArgs.cs
- ResourceAttributes.cs
- ColumnMapTranslator.cs
- PointCollectionValueSerializer.cs
- IntSecurity.cs
- EditorServiceContext.cs
- PersonalizationStateQuery.cs
- FileDataSourceCache.cs
- ToolboxItemWrapper.cs
- Table.cs
- DesignerProperties.cs
- TypedElement.cs
- WebPartDescriptionCollection.cs
- StreamingContext.cs
- GraphicsPath.cs
- XmlCharCheckingWriter.cs
- CompiledQueryCacheEntry.cs
- TranslateTransform3D.cs
- WebRequestModuleElement.cs
- DataGridViewRowCancelEventArgs.cs
- SafeFileMapViewHandle.cs
- ApplicationSettingsBase.cs
- UnitySerializationHolder.cs
- DataTemplateKey.cs
- ColumnHeader.cs
- AnimationStorage.cs
- OutOfMemoryException.cs
- BaseProcessor.cs
- EditorPart.cs
- DataGridCommandEventArgs.cs
- DataProtectionSecurityStateEncoder.cs
- EventSourceCreationData.cs
- TemplateColumn.cs
- ToolStripPanelRow.cs
- ValidationSummary.cs
- ControlCollection.cs
- WindowsFormsLinkLabel.cs
- ColorBlend.cs
- GlyphShapingProperties.cs
- PropertyTabAttribute.cs
- NameNode.cs
- Executor.cs
- MemoryStream.cs
- TriggerCollection.cs
- NetworkCredential.cs
- GeometryHitTestParameters.cs
- PriorityItem.cs
- MobileListItem.cs
- GestureRecognitionResult.cs
- util.cs
- AvtEvent.cs
- GeometryModel3D.cs
- WindowsTitleBar.cs
- AbstractExpressions.cs
- RefreshEventArgs.cs
- RenderOptions.cs
- Knowncolors.cs
- MachineKeyValidationConverter.cs
- nulltextcontainer.cs
- DefaultIfEmptyQueryOperator.cs
- CommonDialog.cs
- IncrementalReadDecoders.cs
- MessagingDescriptionAttribute.cs
- SiteMembershipCondition.cs
- ByteStack.cs
- LinqDataSourceView.cs
- DataStorage.cs
- XPathMessageFilterElement.cs
- InstanceCreationEditor.cs
- EventProperty.cs
- XmlLanguageConverter.cs
- OperationPerformanceCounters.cs
- FreezableOperations.cs
- TextMessageEncodingElement.cs
- NamedPipeConnectionPoolSettings.cs
- Misc.cs
- DbModificationClause.cs
- WsiProfilesElement.cs
- EventHandlersStore.cs
- ReferencedAssembly.cs
- SinglePageViewer.cs
- CompilerResults.cs
- WebReferencesBuildProvider.cs
- MessageQueue.cs
- ComIntegrationManifestGenerator.cs
- Rect3D.cs