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
- RangeContentEnumerator.cs
- SiteOfOriginContainer.cs
- HighlightComponent.cs
- EntityDataSourceContainerNameConverter.cs
- ButtonBase.cs
- XmlEventCache.cs
- DetailsViewCommandEventArgs.cs
- panel.cs
- MouseOverProperty.cs
- Win32NamedPipes.cs
- InternalConfigRoot.cs
- WizardDesigner.cs
- ConfigurationException.cs
- DirectoryObjectSecurity.cs
- FunctionNode.cs
- DmlSqlGenerator.cs
- ForwardPositionQuery.cs
- PolygonHotSpot.cs
- Int32CollectionConverter.cs
- Icon.cs
- HttpResponseBase.cs
- IndependentlyAnimatedPropertyMetadata.cs
- IDReferencePropertyAttribute.cs
- SaveLedgerEntryRequest.cs
- XmlNamespaceDeclarationsAttribute.cs
- DocumentGridPage.cs
- RawStylusSystemGestureInputReport.cs
- WorkflowViewManager.cs
- CodeTypeOfExpression.cs
- WebPartConnectionsConnectVerb.cs
- ColorIndependentAnimationStorage.cs
- ViewValidator.cs
- CalendarItem.cs
- OSFeature.cs
- ToolboxBitmapAttribute.cs
- EpmSyndicationContentSerializer.cs
- LinkDesigner.cs
- Certificate.cs
- CodeEntryPointMethod.cs
- QueryOpeningEnumerator.cs
- EventLogger.cs
- CfgRule.cs
- Int16AnimationUsingKeyFrames.cs
- DataGridViewRowEventArgs.cs
- InnerItemCollectionView.cs
- EmbeddedMailObject.cs
- DataGridParentRows.cs
- PlainXmlWriter.cs
- HtmlContainerControl.cs
- ReachPageContentSerializerAsync.cs
- TextSelectionHighlightLayer.cs
- IsolatedStorageFileStream.cs
- RbTree.cs
- BamlCollectionHolder.cs
- PowerModeChangedEventArgs.cs
- WebMessageBodyStyleHelper.cs
- TakeQueryOptionExpression.cs
- BlurEffect.cs
- ReachUIElementCollectionSerializer.cs
- DeleteCardRequest.cs
- SecurityUtils.cs
- ExecutedRoutedEventArgs.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataGridRow.cs
- Expression.cs
- XmlSiteMapProvider.cs
- DataGridViewDataConnection.cs
- Internal.cs
- Size3D.cs
- ScrollEventArgs.cs
- DoWorkEventArgs.cs
- DescendantOverDescendantQuery.cs
- StateBag.cs
- HyperLink.cs
- XmlQueryContext.cs
- ILGenerator.cs
- GZipDecoder.cs
- HttpListenerTimeoutManager.cs
- HuffCodec.cs
- SimpleHandlerBuildProvider.cs
- Pen.cs
- BulletedList.cs
- WsatConfiguration.cs
- EntitySqlQueryCacheEntry.cs
- ClientSideQueueItem.cs
- WebPartUserCapability.cs
- Win32MouseDevice.cs
- ThreadPool.cs
- ContainerFilterService.cs
- WindowCollection.cs
- ComponentChangingEvent.cs
- WindowsTab.cs
- ping.cs
- WaitHandle.cs
- PeerEndPoint.cs
- shaperfactoryquerycacheentry.cs
- UICuesEvent.cs
- NotificationContext.cs
- StopStoryboard.cs
- LayoutManager.cs