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
- HMACSHA1.cs
- HostedHttpRequestAsyncResult.cs
- DbProviderFactory.cs
- ScrollPattern.cs
- MethodBody.cs
- CqlWriter.cs
- VsPropertyGrid.cs
- WebPartConnectionsConfigureVerb.cs
- IconConverter.cs
- Int16KeyFrameCollection.cs
- IdentityValidationException.cs
- HtmlSelect.cs
- ThreadSafeList.cs
- WebPartCancelEventArgs.cs
- CompilerErrorCollection.cs
- TypeUtil.cs
- ApplicationException.cs
- ComponentResourceManager.cs
- MarkupObject.cs
- NetworkInformationPermission.cs
- TextViewSelectionProcessor.cs
- sqlcontext.cs
- MediaElement.cs
- EventMappingSettingsCollection.cs
- TextBoxAutomationPeer.cs
- ZipIORawDataFileBlock.cs
- _NegotiateClient.cs
- WebConfigurationFileMap.cs
- ServiceBusyException.cs
- Int32Converter.cs
- QueryOutputWriter.cs
- CachedBitmap.cs
- XamlDesignerSerializationManager.cs
- TableRowCollection.cs
- AuthenticationModuleElementCollection.cs
- AppDomainShutdownMonitor.cs
- RadioButtonPopupAdapter.cs
- ToolStripGrip.cs
- SafeMILHandleMemoryPressure.cs
- QueryableDataSourceEditData.cs
- SiteMembershipCondition.cs
- XmlSchemaSearchPattern.cs
- cookieexception.cs
- OLEDB_Enum.cs
- ErrorRuntimeConfig.cs
- Merger.cs
- ImagingCache.cs
- DataTableNewRowEvent.cs
- LinkConverter.cs
- OpenFileDialog.cs
- ModelItemCollection.cs
- WorkflowInspectionServices.cs
- TcpChannelHelper.cs
- CryptoApi.cs
- HttpRequestBase.cs
- CompareInfo.cs
- TreePrinter.cs
- ToolStripPanelRow.cs
- ChannelFactoryBase.cs
- UpdateManifestForBrowserApplication.cs
- SQLCharsStorage.cs
- externdll.cs
- FillErrorEventArgs.cs
- QueryOptionExpression.cs
- Quad.cs
- StylusDownEventArgs.cs
- SpinLock.cs
- DictionaryBase.cs
- AesManaged.cs
- EventMappingSettingsCollection.cs
- WindowsListViewGroupHelper.cs
- NGCSerializationManager.cs
- DesigntimeLicenseContextSerializer.cs
- PenLineCapValidation.cs
- FloaterParaClient.cs
- IdnElement.cs
- MimeParameterWriter.cs
- SqlVersion.cs
- DoubleLinkListEnumerator.cs
- MatrixConverter.cs
- ElementHost.cs
- MexHttpsBindingCollectionElement.cs
- ReaderWriterLockSlim.cs
- SrgsToken.cs
- ReadOnlyKeyedCollection.cs
- WsatServiceCertificate.cs
- WmlValidatorAdapter.cs
- TextEditorLists.cs
- SystemNetworkInterface.cs
- EntityDataSourceContextCreatingEventArgs.cs
- Rect.cs
- WebPartDisplayModeCollection.cs
- SmtpCommands.cs
- DataServiceRequestOfT.cs
- SpecialNameAttribute.cs
- XmlReaderDelegator.cs
- GlyphsSerializer.cs
- InternalConfigRoot.cs
- Hex.cs
- SqlRemoveConstantOrderBy.cs