Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- TagPrefixInfo.cs
- PreviewKeyDownEventArgs.cs
- RectConverter.cs
- IgnoreSectionHandler.cs
- WebPartManagerInternals.cs
- ConsumerConnectionPoint.cs
- TypeLibConverter.cs
- StringOutput.cs
- ComplexTypeEmitter.cs
- RuleSettingsCollection.cs
- StubHelpers.cs
- IdentitySection.cs
- PermissionSetEnumerator.cs
- ManagementObjectCollection.cs
- Ppl.cs
- StylusPointProperty.cs
- KeyTime.cs
- Logging.cs
- QilTargetType.cs
- InboundActivityHelper.cs
- WsiProfilesElement.cs
- Polyline.cs
- Html32TextWriter.cs
- UiaCoreProviderApi.cs
- xdrvalidator.cs
- WindowsStreamSecurityElement.cs
- DbConnectionPoolIdentity.cs
- HtmlTableCell.cs
- TimeSpan.cs
- ParsedAttributeCollection.cs
- ReadOnlyCollectionBase.cs
- WindowInteractionStateTracker.cs
- Mutex.cs
- TextRunTypographyProperties.cs
- HMACSHA256.cs
- RawTextInputReport.cs
- DbConnectionStringCommon.cs
- HttpCacheVary.cs
- Size.cs
- Operator.cs
- RichTextBoxAutomationPeer.cs
- TreeViewHitTestInfo.cs
- BitConverter.cs
- StorageRoot.cs
- GeneralTransform2DTo3D.cs
- NameValueConfigurationElement.cs
- FieldAccessException.cs
- XhtmlBasicLinkAdapter.cs
- ModuleBuilder.cs
- Parser.cs
- AssemblyNameProxy.cs
- Int32CAMarshaler.cs
- Base64Stream.cs
- AliasedSlot.cs
- FloaterParagraph.cs
- XmlCDATASection.cs
- CursorConverter.cs
- Parser.cs
- FixedSOMContainer.cs
- DynamicFilter.cs
- ComponentResourceKey.cs
- HorizontalAlignConverter.cs
- localization.cs
- EventSource.cs
- SelectionProviderWrapper.cs
- XmlSchemaAll.cs
- httpserverutility.cs
- SqlBulkCopy.cs
- GPRECTF.cs
- ParserOptions.cs
- ApplicationHost.cs
- UnsafeMethods.cs
- ConfigXmlSignificantWhitespace.cs
- CollectionViewGroupInternal.cs
- ToolStripMenuItem.cs
- Funcletizer.cs
- MemoryResponseElement.cs
- PasswordBox.cs
- XmlException.cs
- DataObjectEventArgs.cs
- TreeWalker.cs
- XmlTypeAttribute.cs
- StructuralObject.cs
- RtfControls.cs
- util.cs
- TableAdapterManagerHelper.cs
- DesignBindingValueUIHandler.cs
- HttpDebugHandler.cs
- PermissionSetTriple.cs
- SmtpAuthenticationManager.cs
- EmptyReadOnlyDictionaryInternal.cs
- StandardBindingElementCollection.cs
- MediaEntryAttribute.cs
- WebContentFormatHelper.cs
- InstalledFontCollection.cs
- HwndSourceKeyboardInputSite.cs
- XmlSerializableWriter.cs
- TextElementCollection.cs
- ObjRef.cs
- TableProviderWrapper.cs