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
- MimeBasePart.cs
- UdpDiscoveryEndpointProvider.cs
- GuidConverter.cs
- TypeDescriptorFilterService.cs
- ApplicationServiceManager.cs
- COM2PictureConverter.cs
- DataTableNewRowEvent.cs
- milexports.cs
- DataBindingCollection.cs
- SqlMetaData.cs
- OptimisticConcurrencyException.cs
- ExpressionParser.cs
- LabelDesigner.cs
- StreamWriter.cs
- DesignTimeTemplateParser.cs
- Calendar.cs
- dataSvcMapFileLoader.cs
- EventProvider.cs
- WebPartEditorCancelVerb.cs
- WCFBuildProvider.cs
- OleAutBinder.cs
- RecognizedPhrase.cs
- ImmutableObjectAttribute.cs
- SessionStateSection.cs
- FormsAuthenticationTicket.cs
- HttpWriter.cs
- ToolStripItemClickedEventArgs.cs
- PointValueSerializer.cs
- NodeFunctions.cs
- Localizer.cs
- Crypto.cs
- ScrollEvent.cs
- FormsAuthenticationEventArgs.cs
- DetailsViewModeEventArgs.cs
- parserscommon.cs
- CodeArgumentReferenceExpression.cs
- LinqDataSourceUpdateEventArgs.cs
- Condition.cs
- TypeNameConverter.cs
- CompositeTypefaceMetrics.cs
- PkcsUtils.cs
- FixedHighlight.cs
- GlobalItem.cs
- LabelAutomationPeer.cs
- FixedFindEngine.cs
- RuntimeUtils.cs
- ValueChangedEventManager.cs
- GraphicsState.cs
- SystemSounds.cs
- FormatVersion.cs
- SchemaDeclBase.cs
- EventSetter.cs
- PropertyDescriptorCollection.cs
- DataRecordInternal.cs
- AxisAngleRotation3D.cs
- WorkItem.cs
- BuildProviderUtils.cs
- Parser.cs
- AutomationPatternInfo.cs
- LowerCaseStringConverter.cs
- DataGridPageChangedEventArgs.cs
- SecurityDescriptor.cs
- Material.cs
- StyleBamlRecordReader.cs
- SessionConnectionReader.cs
- RectangleConverter.cs
- XamlSerializerUtil.cs
- RTLAwareMessageBox.cs
- WorkflowServiceBehavior.cs
- Base64Encoding.cs
- Globals.cs
- MulticastDelegate.cs
- SessionEndingCancelEventArgs.cs
- SecurityElement.cs
- Stackframe.cs
- MsmqReceiveParameters.cs
- LockRecursionException.cs
- BitmapEffectGeneralTransform.cs
- DeclarativeCatalogPart.cs
- ReachDocumentPageSerializerAsync.cs
- SubpageParaClient.cs
- XamlTypeWithExplicitNamespace.cs
- Shape.cs
- HtmlTableRow.cs
- InkSerializer.cs
- LockRenewalTask.cs
- XmlIgnoreAttribute.cs
- EnvelopedPkcs7.cs
- NativeMethods.cs
- SessionStateModule.cs
- PermissionSetEnumerator.cs
- DesignerVerb.cs
- NotConverter.cs
- PrinterUnitConvert.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ObjectViewEntityCollectionData.cs
- WpfKnownType.cs
- SQLInt64Storage.cs
- BooleanKeyFrameCollection.cs
- TraceData.cs