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
- HyperLinkColumn.cs
- ByValueEqualityComparer.cs
- AndCondition.cs
- MgmtConfigurationRecord.cs
- RemoteTokenFactory.cs
- XmlSerializableWriter.cs
- PermissionToken.cs
- ParameterElementCollection.cs
- CodePageUtils.cs
- SendActivityDesignerTheme.cs
- ACE.cs
- ReceiveDesigner.xaml.cs
- StructuredCompositeActivityDesigner.cs
- DataGridViewButtonColumn.cs
- XmlSubtreeReader.cs
- WrappedKeySecurityToken.cs
- WebScriptEndpoint.cs
- AQNBuilder.cs
- CompilationAssemblyInstallComponent.cs
- MessagingDescriptionAttribute.cs
- HTMLTextWriter.cs
- XPathDocument.cs
- QueryReaderSettings.cs
- BitmapEffectState.cs
- BitmapFrame.cs
- ButtonAutomationPeer.cs
- XmlDataSourceNodeDescriptor.cs
- RightsManagementPermission.cs
- TriggerBase.cs
- ComboBox.cs
- CompilerResults.cs
- BinaryUtilClasses.cs
- BitmapCodecInfoInternal.cs
- LinqDataSourceDeleteEventArgs.cs
- InvalidComObjectException.cs
- DataBinder.cs
- JsonQueryStringConverter.cs
- PointAnimationBase.cs
- FloaterParagraph.cs
- CounterSet.cs
- Oci.cs
- PrintPageEvent.cs
- SequenceQuery.cs
- EncodingNLS.cs
- ManualWorkflowSchedulerService.cs
- DesignerHelpers.cs
- RequiredFieldValidator.cs
- OleDbErrorCollection.cs
- ListViewGroupCollectionEditor.cs
- SiteMapProvider.cs
- ClientSponsor.cs
- UdpSocket.cs
- PolyBezierSegment.cs
- DelegatedStream.cs
- WindowsServiceElement.cs
- ExternalException.cs
- sqlcontext.cs
- GeneralTransform3DTo2DTo3D.cs
- AccessorTable.cs
- CallbackHandler.cs
- StateDesignerConnector.cs
- OleDbRowUpdatingEvent.cs
- TextParagraphCache.cs
- Brush.cs
- ConfigurationSchemaErrors.cs
- EmulateRecognizeCompletedEventArgs.cs
- NumericUpDownAccelerationCollection.cs
- DbModificationClause.cs
- NullRuntimeConfig.cs
- SimpleApplicationHost.cs
- Transactions.cs
- Crypto.cs
- ReadOnlyCollectionBuilder.cs
- ContextInformation.cs
- DataReaderContainer.cs
- ConfigurationValue.cs
- WebBrowserSiteBase.cs
- ObjectDataSourceFilteringEventArgs.cs
- GroupBox.cs
- FlowDocumentReaderAutomationPeer.cs
- TextRunProperties.cs
- EncryptedKeyIdentifierClause.cs
- CombinedGeometry.cs
- SqlProviderServices.cs
- BulletChrome.cs
- ApplyImportsAction.cs
- Constraint.cs
- Keywords.cs
- ContextMenuStrip.cs
- DataContractJsonSerializer.cs
- ProjectionCamera.cs
- TextTreeRootNode.cs
- ConfigUtil.cs
- ping.cs
- DebugTrace.cs
- BitArray.cs
- TextHidden.cs
- UriSection.cs
- XmlNodeChangedEventArgs.cs
- XmlCharType.cs