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
- AppModelKnownContentFactory.cs
- LocalizableAttribute.cs
- SignatureDescription.cs
- JavaScriptObjectDeserializer.cs
- SqlInternalConnectionSmi.cs
- ExtractorMetadata.cs
- CodeVariableReferenceExpression.cs
- AutomationFocusChangedEventArgs.cs
- CompilationLock.cs
- ValidationSettings.cs
- SrgsElement.cs
- InstalledVoice.cs
- NotFiniteNumberException.cs
- ServiceNameElement.cs
- SafeRightsManagementHandle.cs
- DataControlFieldCell.cs
- SAPICategories.cs
- RC2.cs
- _NegotiateClient.cs
- DbConnectionStringBuilder.cs
- RelationshipDetailsRow.cs
- WCFBuildProvider.cs
- ZoneButton.cs
- SelectorItemAutomationPeer.cs
- ErrorRuntimeConfig.cs
- DocumentOrderComparer.cs
- StoreAnnotationsMap.cs
- EditableRegion.cs
- GridViewCellAutomationPeer.cs
- SapiRecognizer.cs
- InternalMappingException.cs
- ClientProxyGenerator.cs
- EntityContainer.cs
- HttpModulesSection.cs
- ChangePassword.cs
- WebPartExportVerb.cs
- PermissionRequestEvidence.cs
- TagNameToTypeMapper.cs
- HttpStreamXmlDictionaryReader.cs
- GrabHandleGlyph.cs
- TextInfo.cs
- Italic.cs
- DiagnosticTrace.cs
- categoryentry.cs
- BindMarkupExtensionSerializer.cs
- GridViewColumnHeaderAutomationPeer.cs
- DataGridLinkButton.cs
- FontInfo.cs
- GroupBox.cs
- TextBoxLine.cs
- StubHelpers.cs
- Subset.cs
- ClientConfigPaths.cs
- WebPartHeaderCloseVerb.cs
- SpStreamWrapper.cs
- prefixendpointaddressmessagefiltertable.cs
- WindowHideOrCloseTracker.cs
- AutomationPatternInfo.cs
- ComponentChangedEvent.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- EditorPartChrome.cs
- ChoiceConverter.cs
- FormsAuthenticationCredentials.cs
- FtpWebResponse.cs
- DiscoveryDocumentSerializer.cs
- VisualBrush.cs
- CommandField.cs
- Brushes.cs
- VisualTarget.cs
- TriggerBase.cs
- Int32.cs
- SelectedGridItemChangedEvent.cs
- FixedPageStructure.cs
- NavigationPropertyEmitter.cs
- PolicyStatement.cs
- SchemaNotation.cs
- RepeatButtonAutomationPeer.cs
- VerticalAlignConverter.cs
- XmlSchemaImport.cs
- Metadata.cs
- EntityContainerEntitySetDefiningQuery.cs
- CommandValueSerializer.cs
- SubpageParaClient.cs
- SecurityTokenResolver.cs
- ToolStripSeparator.cs
- RangeValueProviderWrapper.cs
- PathTooLongException.cs
- DockPattern.cs
- LifetimeServices.cs
- LocalFileSettingsProvider.cs
- EntityDataSourceValidationException.cs
- PerfService.cs
- TitleStyle.cs
- PluralizationServiceUtil.cs
- CodeMemberMethod.cs
- ImageConverter.cs
- ChtmlMobileTextWriter.cs
- IItemContainerGenerator.cs
- Line.cs
- Part.cs