Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / DataObjectMethodAttribute.cs / 1 / 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
- HtmlContainerControl.cs
- ImageMapEventArgs.cs
- AutoResetEvent.cs
- ReadOnlyPropertyMetadata.cs
- KeyGestureConverter.cs
- BevelBitmapEffect.cs
- ServiceDescriptionReflector.cs
- Timer.cs
- XmlSubtreeReader.cs
- IndependentAnimationStorage.cs
- EndpointDiscoveryElement.cs
- Exceptions.cs
- ScrollBarAutomationPeer.cs
- StaticSiteMapProvider.cs
- ScrollViewerAutomationPeer.cs
- StylusTip.cs
- DiagnosticTrace.cs
- Point3DAnimationBase.cs
- ControlAdapter.cs
- EntityCodeGenerator.cs
- CompilerCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ProcessStartInfo.cs
- XPathBinder.cs
- WindowsHyperlink.cs
- StyleBamlTreeBuilder.cs
- wgx_render.cs
- QilUnary.cs
- KeyedHashAlgorithm.cs
- TemplateBuilder.cs
- Errors.cs
- MouseGestureConverter.cs
- FrameworkElementFactoryMarkupObject.cs
- WebPartAddingEventArgs.cs
- UnsafeNativeMethods.cs
- NumberFormatInfo.cs
- DashStyle.cs
- ProfilePropertyMetadata.cs
- TextEffect.cs
- PathData.cs
- XmlReaderSettings.cs
- TaskScheduler.cs
- ResolveNameEventArgs.cs
- StringDictionaryWithComparer.cs
- RangeValueProviderWrapper.cs
- InternalsVisibleToAttribute.cs
- ParseNumbers.cs
- OleDbPropertySetGuid.cs
- XmlWrappingReader.cs
- RepeatBehaviorConverter.cs
- ContainerParagraph.cs
- BindingFormattingDialog.cs
- TraceInternal.cs
- OneOfConst.cs
- AtomParser.cs
- CodeActivityContext.cs
- StrongNamePublicKeyBlob.cs
- StringArrayEditor.cs
- ExitEventArgs.cs
- ComplexTypeEmitter.cs
- AdPostCacheSubstitution.cs
- DataGridViewSelectedCellCollection.cs
- WindowsSlider.cs
- MembershipSection.cs
- PropertyPushdownHelper.cs
- WindowsListViewSubItem.cs
- SqlMetaData.cs
- ComponentCommands.cs
- CustomCredentialPolicy.cs
- DataGridBoolColumn.cs
- Int64KeyFrameCollection.cs
- HttpWriter.cs
- ResourceManager.cs
- SecondaryViewProvider.cs
- CroppedBitmap.cs
- ScrollBar.cs
- StickyNoteHelper.cs
- TransformerConfigurationWizardBase.cs
- AmbientLight.cs
- figurelength.cs
- PackageRelationshipCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- GenericArgumentsUpdater.cs
- GenericTextProperties.cs
- RenderDataDrawingContext.cs
- GradientStop.cs
- DoWorkEventArgs.cs
- Int32AnimationBase.cs
- WindowsNonControl.cs
- TextTreeInsertUndoUnit.cs
- PreservationFileReader.cs
- SrgsRule.cs
- MessageBuilder.cs
- Padding.cs
- VirtualDirectoryMappingCollection.cs
- InputBinder.cs
- HttpResponseHeader.cs
- NetworkCredential.cs
- StringSorter.cs
- BrushConverter.cs