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
- BigInt.cs
- DataGridViewLayoutData.cs
- ConfigXmlWhitespace.cs
- _NetRes.cs
- PropertyValueChangedEvent.cs
- PersonalizationProvider.cs
- PackageRelationshipSelector.cs
- SimplePropertyEntry.cs
- FixedPageAutomationPeer.cs
- IntegerValidator.cs
- WebServiceClientProxyGenerator.cs
- DesignerCategoryAttribute.cs
- GroupItemAutomationPeer.cs
- BamlTreeUpdater.cs
- IndentTextWriter.cs
- XmlIncludeAttribute.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- FixedFlowMap.cs
- Site.cs
- OpenFileDialog.cs
- SqlXmlStorage.cs
- EditBehavior.cs
- X509CertificateValidator.cs
- SettingsAttributes.cs
- AssemblyBuilder.cs
- SecureUICommand.cs
- ConnectionManagementElement.cs
- Token.cs
- SizeAnimationBase.cs
- ControlType.cs
- login.cs
- UpdateException.cs
- AssemblyAttributesGoHere.cs
- ToolboxItemFilterAttribute.cs
- PropertyGridEditorPart.cs
- LowerCaseStringConverter.cs
- ListViewItem.cs
- MessageFault.cs
- BitmapEffectDrawingContent.cs
- Polygon.cs
- UMPAttributes.cs
- DependencyPropertyKey.cs
- DataControlImageButton.cs
- Table.cs
- HtmlProps.cs
- DriveInfo.cs
- MultiPropertyDescriptorGridEntry.cs
- PolygonHotSpot.cs
- TransactionManager.cs
- BinaryQueryOperator.cs
- XPathDescendantIterator.cs
- DependentList.cs
- ResourcesGenerator.cs
- QilInvokeEarlyBound.cs
- SynchronizedDispatch.cs
- WindowManager.cs
- SqlDataSourceFilteringEventArgs.cs
- ListItemConverter.cs
- CqlErrorHelper.cs
- ProfilePropertySettingsCollection.cs
- RootBuilder.cs
- WaitHandle.cs
- _RequestCacheProtocol.cs
- TrackingLocationCollection.cs
- FrameworkTextComposition.cs
- AttributeProviderAttribute.cs
- ImageMap.cs
- ping.cs
- AnnotationAuthorChangedEventArgs.cs
- XPathParser.cs
- SmtpReplyReader.cs
- Subtree.cs
- RegexReplacement.cs
- PnrpPeerResolverBindingElement.cs
- SettingsBase.cs
- ChannelSinkStacks.cs
- IndentedTextWriter.cs
- Rotation3DAnimationUsingKeyFrames.cs
- EditorPartChrome.cs
- AnnotationHighlightLayer.cs
- ScrollableControl.cs
- _TLSstream.cs
- DropSource.cs
- ToolboxItemAttribute.cs
- BinaryMethodMessage.cs
- StorageMappingItemCollection.cs
- QuaternionAnimationBase.cs
- ConstantSlot.cs
- OutputChannel.cs
- CodeTypeDelegate.cs
- ConfigurationValidatorAttribute.cs
- LayoutEvent.cs
- ForEachAction.cs
- WrappedKeySecurityTokenParameters.cs
- Formatter.cs
- ParentQuery.cs
- FieldAccessException.cs
- ToggleButton.cs
- securitycriticaldata.cs
- QueryAsyncResult.cs