Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MethodBuilderInstantiation.cs
- InfoCardProofToken.cs
- StylusPointProperties.cs
- InstanceData.cs
- HttpProfileBase.cs
- PersonalizationAdministration.cs
- GacUtil.cs
- MultiBindingExpression.cs
- DispatcherTimer.cs
- PersonalizationProviderCollection.cs
- BitmapEffect.cs
- webproxy.cs
- CodeIdentifier.cs
- FrameAutomationPeer.cs
- WorkflowDefinitionDispenser.cs
- Buffer.cs
- MenuStrip.cs
- BackoffTimeoutHelper.cs
- PageThemeBuildProvider.cs
- SqlExpressionNullability.cs
- CodeTypeDeclaration.cs
- DbMetaDataColumnNames.cs
- QfeChecker.cs
- UserControlDesigner.cs
- NotifyCollectionChangedEventArgs.cs
- SchemaNames.cs
- UnsafeNativeMethodsTablet.cs
- Crc32.cs
- LinkUtilities.cs
- TargetFrameworkAttribute.cs
- messageonlyhwndwrapper.cs
- Pen.cs
- WebServicesSection.cs
- AssertHelper.cs
- Processor.cs
- ProgressPage.cs
- SiteMapDataSource.cs
- SchemaTableOptionalColumn.cs
- ApplicationDirectoryMembershipCondition.cs
- SafeReversePInvokeHandle.cs
- WebPartZoneCollection.cs
- DropDownList.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- WindowsIdentity.cs
- TransactionTraceIdentifier.cs
- XmlObjectSerializer.cs
- dbenumerator.cs
- StylusSystemGestureEventArgs.cs
- Region.cs
- Part.cs
- SqlLiftWhereClauses.cs
- UnsafeNativeMethodsPenimc.cs
- AnimationClock.cs
- ComplexBindingPropertiesAttribute.cs
- MetabaseServerConfig.cs
- SchemaImporterExtensionsSection.cs
- MDIControlStrip.cs
- CfgParser.cs
- RadioButtonFlatAdapter.cs
- Guid.cs
- MD5.cs
- ObjectToken.cs
- ContentFileHelper.cs
- WebControlParameterProxy.cs
- DateTimePicker.cs
- Wizard.cs
- MailBnfHelper.cs
- IndexedEnumerable.cs
- Int32.cs
- RIPEMD160.cs
- EncoderNLS.cs
- PrintDialog.cs
- EditorZoneBase.cs
- MultiDataTrigger.cs
- DrawingContextDrawingContextWalker.cs
- XPathConvert.cs
- OracleTransaction.cs
- ColumnWidthChangingEvent.cs
- LinearGradientBrush.cs
- QueuePathDialog.cs
- Latin1Encoding.cs
- XmlWrappingReader.cs
- CodeIterationStatement.cs
- ToolStripContainer.cs
- FilterException.cs
- SafeNativeMethods.cs
- Misc.cs
- DataGridViewLinkCell.cs
- SchemaTableColumn.cs
- SchemaManager.cs
- UIPermission.cs
- BoundColumn.cs
- WebRequest.cs
- NativeMethods.cs
- DataGridColumnCollectionEditor.cs
- DrawingImage.cs
- GridViewDeleteEventArgs.cs
- TransactedBatchingElement.cs
- BinaryFormatter.cs
- TextBlock.cs