Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DataObjectMethodAttribute.cs / 1305376 / DataObjectMethodAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Method)] public sealed class DataObjectMethodAttribute : Attribute { private bool _isDefault; private DataObjectMethodType _methodType; public DataObjectMethodAttribute(DataObjectMethodType methodType) : this(methodType, false) { } public DataObjectMethodAttribute(DataObjectMethodType methodType, bool isDefault) { _methodType = methodType; _isDefault = isDefault; } public bool IsDefault { get { return _isDefault; } } public DataObjectMethodType MethodType { get { return _methodType; } } ///public override bool Equals(object obj) { if (obj == this) { return true; } DataObjectMethodAttribute other = obj as DataObjectMethodAttribute; return (other != null) && (other.MethodType == MethodType) && (other.IsDefault == IsDefault); } /// public override int GetHashCode() { return ((int)_methodType).GetHashCode() ^ _isDefault.GetHashCode(); } /// public override bool Match(object obj) { if (obj == this) { return true; } DataObjectMethodAttribute other = obj as DataObjectMethodAttribute; return (other != null) && (other.MethodType == MethodType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Method)] public sealed class DataObjectMethodAttribute : Attribute { private bool _isDefault; private DataObjectMethodType _methodType; public DataObjectMethodAttribute(DataObjectMethodType methodType) : this(methodType, false) { } public DataObjectMethodAttribute(DataObjectMethodType methodType, bool isDefault) { _methodType = methodType; _isDefault = isDefault; } public bool IsDefault { get { return _isDefault; } } public DataObjectMethodType MethodType { get { return _methodType; } } ///public override bool Equals(object obj) { if (obj == this) { return true; } DataObjectMethodAttribute other = obj as DataObjectMethodAttribute; return (other != null) && (other.MethodType == MethodType) && (other.IsDefault == IsDefault); } /// public override int GetHashCode() { return ((int)_methodType).GetHashCode() ^ _isDefault.GetHashCode(); } /// public override bool Match(object obj) { if (obj == this) { return true; } DataObjectMethodAttribute other = obj as DataObjectMethodAttribute; return (other != null) && (other.MethodType == MethodType); } } } // 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
- XmlDataImplementation.cs
- _BasicClient.cs
- TemplateContainer.cs
- WebHostUnsafeNativeMethods.cs
- PerfCounters.cs
- LogPolicy.cs
- TextStore.cs
- SerializerWriterEventHandlers.cs
- OleAutBinder.cs
- SessionChannels.cs
- XmlSchemaNotation.cs
- HttpWebRequestElement.cs
- Ref.cs
- PromptStyle.cs
- SecureStringHasher.cs
- TrackBarRenderer.cs
- StickyNoteAnnotations.cs
- MSHTMLHost.cs
- DbQueryCommandTree.cs
- SemanticBasicElement.cs
- ComponentEditorForm.cs
- IpcPort.cs
- PropertyChangedEventArgs.cs
- ScrollItemProviderWrapper.cs
- PropertyConverter.cs
- EditingCoordinator.cs
- SimpleType.cs
- NetworkInformationException.cs
- CatalogZone.cs
- GenericUriParser.cs
- MdiWindowListItemConverter.cs
- StringArrayConverter.cs
- Timer.cs
- SchemaImporterExtension.cs
- TextDecorations.cs
- LabelTarget.cs
- ActivationProxy.cs
- SolidBrush.cs
- ResXResourceWriter.cs
- AsmxEndpointPickerExtension.cs
- DataListItemCollection.cs
- RemotingConfigParser.cs
- StringFreezingAttribute.cs
- OletxResourceManager.cs
- RegisteredScript.cs
- ClientSession.cs
- FrameworkTemplate.cs
- PartialCachingAttribute.cs
- DateTimeFormatInfo.cs
- CompilerWrapper.cs
- PropertyItem.cs
- WebPartCancelEventArgs.cs
- CodeStatement.cs
- ComNativeDescriptor.cs
- ArithmeticException.cs
- SQLInt64.cs
- WebBrowserPermission.cs
- ColorPalette.cs
- WindowsFont.cs
- IODescriptionAttribute.cs
- PixelShader.cs
- HwndSubclass.cs
- ParserContext.cs
- GridViewCommandEventArgs.cs
- PolyLineSegment.cs
- QilScopedVisitor.cs
- Transaction.cs
- Point4DValueSerializer.cs
- BasicExpressionVisitor.cs
- TrackingRecord.cs
- EdmPropertyAttribute.cs
- ViewKeyConstraint.cs
- PermissionRequestEvidence.cs
- CollectionChangeEventArgs.cs
- SymDocumentType.cs
- Symbol.cs
- Claim.cs
- SizeConverter.cs
- COAUTHINFO.cs
- IndentTextWriter.cs
- PersonalizableTypeEntry.cs
- ResourceReader.cs
- HybridDictionary.cs
- DashStyle.cs
- MatrixAnimationBase.cs
- TextMarkerSource.cs
- LocalIdKeyIdentifierClause.cs
- NativeMethods.cs
- OperationParameterInfo.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XmlILOptimizerVisitor.cs
- XDRSchema.cs
- DeviceContext.cs
- VisemeEventArgs.cs
- ImageListImage.cs
- TokenBasedSet.cs
- StdRegProviderWrapper.cs
- MediaSystem.cs
- PermissionListSet.cs
- PointHitTestParameters.cs