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
- ConfigurationStrings.cs
- DataProtection.cs
- WasNotInstalledException.cs
- Parser.cs
- WebConfigurationHostFileChange.cs
- base64Transforms.cs
- OracleConnectionStringBuilder.cs
- cookiecontainer.cs
- Button.cs
- AuthenticationService.cs
- BackStopAuthenticationModule.cs
- PixelFormats.cs
- ClassHandlersStore.cs
- RectangleHotSpot.cs
- Expressions.cs
- TypeTypeConverter.cs
- VirtualPathUtility.cs
- ChineseLunisolarCalendar.cs
- DataSourceControlBuilder.cs
- PeerMaintainer.cs
- SpeechSynthesizer.cs
- DataKeyCollection.cs
- CodeNamespaceCollection.cs
- ListMarkerSourceInfo.cs
- FamilyMap.cs
- XmlDataProvider.cs
- UrlMappingsModule.cs
- WebPartConnectionsEventArgs.cs
- DataSourceListEditor.cs
- TextSimpleMarkerProperties.cs
- AutomationElementCollection.cs
- XmlHierarchicalDataSourceView.cs
- SymDocumentType.cs
- ExtendedPropertyInfo.cs
- DescriptionAttribute.cs
- MatrixCamera.cs
- WindowsEditBoxRange.cs
- LOSFormatter.cs
- DataKeyCollection.cs
- ComponentDispatcher.cs
- ConcurrentDictionary.cs
- XPathSelfQuery.cs
- WpfGeneratedKnownProperties.cs
- NegotiationTokenAuthenticator.cs
- XsdDateTime.cs
- CopyOnWriteList.cs
- DataGridTextBoxColumn.cs
- InstanceDataCollection.cs
- DataProtection.cs
- X509PeerCertificateAuthentication.cs
- XPathNodeHelper.cs
- DoubleStorage.cs
- PackWebResponse.cs
- FormsAuthenticationCredentials.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ConfigurationException.cs
- CombinedGeometry.cs
- PerformanceCounterPermissionEntry.cs
- PrintingPermissionAttribute.cs
- SafeNativeMethods.cs
- DataMisalignedException.cs
- UriSection.cs
- SamlAssertion.cs
- ReflectEventDescriptor.cs
- TdsParserHelperClasses.cs
- PrivateFontCollection.cs
- XmlUtil.cs
- ProcessModule.cs
- DockProviderWrapper.cs
- DataGridPagerStyle.cs
- DataRowView.cs
- IListConverters.cs
- PasswordDeriveBytes.cs
- FileUpload.cs
- OracleSqlParser.cs
- ListItemParagraph.cs
- ZoneButton.cs
- RequestQueue.cs
- WMIGenerator.cs
- CompareValidator.cs
- _SpnDictionary.cs
- BuildProvider.cs
- ConfigurationManagerInternalFactory.cs
- NotFiniteNumberException.cs
- GeneralTransform2DTo3DTo2D.cs
- SymbolMethod.cs
- ObjectMaterializedEventArgs.cs
- EnumUnknown.cs
- TcpChannelHelper.cs
- RequestQueryParser.cs
- XmlNodeComparer.cs
- DefaultValueTypeConverter.cs
- ByteArrayHelperWithString.cs
- ValidatingReaderNodeData.cs
- SetStateDesigner.cs
- Classification.cs
- SchemaDeclBase.cs
- Zone.cs
- Blend.cs
- Geometry.cs