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
- DataGridViewRowEventArgs.cs
- WebPartVerbsEventArgs.cs
- DataSetSchema.cs
- HuffCodec.cs
- Rfc2898DeriveBytes.cs
- DiscriminatorMap.cs
- AnimatedTypeHelpers.cs
- RangeValidator.cs
- LogicalExpr.cs
- GraphicsContainer.cs
- PrintEvent.cs
- HashHelpers.cs
- PageRequestManager.cs
- SelectorItemAutomationPeer.cs
- Transform.cs
- UIElementAutomationPeer.cs
- XmlTextWriter.cs
- SignatureResourcePool.cs
- FormatConvertedBitmap.cs
- NativeMethodsOther.cs
- coordinatorscratchpad.cs
- NominalTypeEliminator.cs
- OdbcCommand.cs
- Facet.cs
- XhtmlBasicSelectionListAdapter.cs
- Vector3DConverter.cs
- WindowsTooltip.cs
- DiscoveryMessageSequence.cs
- HandlerFactoryWrapper.cs
- OdbcConnection.cs
- TransformerInfoCollection.cs
- TypeUnloadedException.cs
- ChangePassword.cs
- WebPartManagerInternals.cs
- ContainerControl.cs
- GuidelineCollection.cs
- DocumentCollection.cs
- Constant.cs
- ToolStripContentPanel.cs
- DefaultPrintController.cs
- NewArray.cs
- LabelDesigner.cs
- CompilerInfo.cs
- XPathScanner.cs
- PrimitiveDataContract.cs
- TextElementEditingBehaviorAttribute.cs
- ProjectionCamera.cs
- DictationGrammar.cs
- CellRelation.cs
- AuthenticationException.cs
- EntityCollection.cs
- ColumnMapCopier.cs
- ImagingCache.cs
- TransformationRules.cs
- XmlCharType.cs
- MSHTMLHostUtil.cs
- Vars.cs
- CopyNamespacesAction.cs
- HighlightComponent.cs
- EventSinkHelperWriter.cs
- PostBackTrigger.cs
- ConfigUtil.cs
- RSACryptoServiceProvider.cs
- LogEntryHeaderSerializer.cs
- PassportAuthenticationEventArgs.cs
- RowType.cs
- MarkupWriter.cs
- DataTableExtensions.cs
- StandardOleMarshalObject.cs
- ZipIOExtraFieldElement.cs
- ScriptControl.cs
- XPathNodePointer.cs
- ManagedWndProcTracker.cs
- SqlConnectionFactory.cs
- TemplateControl.cs
- EntityContainerAssociationSet.cs
- ObjectListItem.cs
- IPPacketInformation.cs
- WorkflowMarkupSerializer.cs
- DocumentViewerConstants.cs
- CodeExporter.cs
- CodeTypeDeclarationCollection.cs
- Deflater.cs
- QuaternionAnimation.cs
- SkipStoryboardToFill.cs
- PieceNameHelper.cs
- DbDataReader.cs
- WebSysDescriptionAttribute.cs
- HtmlWindow.cs
- HtmlElement.cs
- Closure.cs
- CompiledIdentityConstraint.cs
- XdrBuilder.cs
- DataBoundLiteralControl.cs
- EdmProviderManifest.cs
- Facet.cs
- ChineseLunisolarCalendar.cs
- DataGridColumnHeaderAutomationPeer.cs
- ControlCachePolicy.cs
- PublishLicense.cs