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
- Native.cs
- HostSecurityManager.cs
- OutputScope.cs
- DecoderExceptionFallback.cs
- unsafeIndexingFilterStream.cs
- StatusCommandUI.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ResourceReader.cs
- MatchAllMessageFilter.cs
- DbModificationCommandTree.cs
- NamespaceCollection.cs
- BufferedGraphics.cs
- HostedElements.cs
- BackStopAuthenticationModule.cs
- EventLogEntry.cs
- XomlCompilerHelpers.cs
- XmlDataContract.cs
- RequestStatusBarUpdateEventArgs.cs
- AlphabetConverter.cs
- ExtensionDataObject.cs
- ProviderConnectionPoint.cs
- CheckableControlBaseAdapter.cs
- DBCommand.cs
- OdbcEnvironmentHandle.cs
- RuntimeArgumentHandle.cs
- CalloutQueueItem.cs
- ClientConfigurationSystem.cs
- ObjectAnimationBase.cs
- SafeArrayRankMismatchException.cs
- TypeConvertions.cs
- StaticResourceExtension.cs
- EventLogPermissionEntry.cs
- ServiceChannelManager.cs
- GridLengthConverter.cs
- RequestQueryProcessor.cs
- Int16.cs
- PageContent.cs
- TraceSection.cs
- EventSetter.cs
- CodeMethodInvokeExpression.cs
- XmlParserContext.cs
- ComboBox.cs
- InvalidContentTypeException.cs
- ListItemCollection.cs
- SchemaNamespaceManager.cs
- AssociationType.cs
- ThreadAttributes.cs
- SecureStringHasher.cs
- ConfigXmlElement.cs
- TableRow.cs
- CaseStatement.cs
- XmlILConstructAnalyzer.cs
- WebBrowserNavigatedEventHandler.cs
- VBCodeProvider.cs
- SmiContextFactory.cs
- AggregateNode.cs
- HttpCapabilitiesBase.cs
- ElementProxy.cs
- GenericFlowSwitchHelper.cs
- InstalledVoice.cs
- DispatcherEventArgs.cs
- UpDownBaseDesigner.cs
- SchemaElement.cs
- OutputScopeManager.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- Cursor.cs
- ManagedIStream.cs
- AnonymousIdentificationModule.cs
- ImageSource.cs
- SQlBooleanStorage.cs
- AsyncResult.cs
- DesignerActionListCollection.cs
- HttpResponseHeader.cs
- XmlSchemaComplexContent.cs
- Emitter.cs
- PathGeometry.cs
- CharacterBuffer.cs
- ServiceDescriptionImporter.cs
- ConnectionPointCookie.cs
- ParallelDesigner.xaml.cs
- HttpModulesSection.cs
- ClientApiGenerator.cs
- MasterPageParser.cs
- ValidationSettings.cs
- HitTestParameters.cs
- TextContainerChangeEventArgs.cs
- AttributeCollection.cs
- WebPartConnectionsCancelEventArgs.cs
- Timeline.cs
- StreamWriter.cs
- DesignerTransactionCloseEvent.cs
- indexingfiltermarshaler.cs
- FieldInfo.cs
- GeometryHitTestResult.cs
- MimeMultiPart.cs
- BinaryObjectReader.cs
- InkCanvas.cs
- DynamicMethod.cs
- Floater.cs
- IntSecurity.cs