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
- BindingParameterCollection.cs
- CellRelation.cs
- CodeTryCatchFinallyStatement.cs
- FileRecordSequence.cs
- DataColumnCollection.cs
- DataGridViewBindingCompleteEventArgs.cs
- AsyncOperation.cs
- HebrewNumber.cs
- HtmlInputFile.cs
- RecognitionResult.cs
- EntityAdapter.cs
- SqlInfoMessageEvent.cs
- DefaultValueTypeConverter.cs
- MultiByteCodec.cs
- BitFlagsGenerator.cs
- EventDescriptorCollection.cs
- DebugView.cs
- TextBox.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ControlAdapter.cs
- RepeatEnumerable.cs
- HtmlInputText.cs
- PropertyGroupDescription.cs
- SrgsNameValueTag.cs
- InkCanvasSelection.cs
- RegistrationServices.cs
- RewritingSimplifier.cs
- WorkflowDurableInstance.cs
- GroupBoxAutomationPeer.cs
- SequentialUshortCollection.cs
- Mapping.cs
- TextReader.cs
- SchemaSetCompiler.cs
- LongCountAggregationOperator.cs
- MetadataFile.cs
- ResolveDuplexCD1AsyncResult.cs
- BaseValidator.cs
- InkCanvasSelectionAdorner.cs
- OwnerDrawPropertyBag.cs
- ListViewItem.cs
- ProviderException.cs
- EmptyEnumerator.cs
- WindowsIdentity.cs
- PassportIdentity.cs
- SqlRewriteScalarSubqueries.cs
- TextParentUndoUnit.cs
- SafeFileHandle.cs
- QilGeneratorEnv.cs
- BinaryReader.cs
- DataGridParentRows.cs
- GenericTypeParameterBuilder.cs
- XamlNamespaceHelper.cs
- WebBaseEventKeyComparer.cs
- PageCache.cs
- HorizontalAlignConverter.cs
- OptimizedTemplateContent.cs
- Control.cs
- CodeChecksumPragma.cs
- WebPart.cs
- Executor.cs
- ObjectDataSourceEventArgs.cs
- BinaryCommonClasses.cs
- Attributes.cs
- XmlEncodedRawTextWriter.cs
- DataList.cs
- SMSvcHost.cs
- Scene3D.cs
- PackageController.cs
- NetPeerTcpBinding.cs
- XmlDesigner.cs
- IsolatedStorageFilePermission.cs
- TextEffectCollection.cs
- Config.cs
- CompModSwitches.cs
- Pkcs7Recipient.cs
- CatalogPart.cs
- PolicyManager.cs
- VariableQuery.cs
- versioninfo.cs
- HtmlHead.cs
- ToggleButtonAutomationPeer.cs
- DecimalFormatter.cs
- IPEndPointCollection.cs
- CategoryNameCollection.cs
- HtmlFormWrapper.cs
- DataGridRelationshipRow.cs
- PreviewPrintController.cs
- AssemblyAttributes.cs
- PermissionAttributes.cs
- NamedObject.cs
- UnsafeNativeMethods.cs
- SqlRemoveConstantOrderBy.cs
- Boolean.cs
- TextSimpleMarkerProperties.cs
- Binding.cs
- OneWayBindingElementImporter.cs
- TargetException.cs
- IxmlLineInfo.cs
- PlaceHolder.cs
- InitializationEventAttribute.cs