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
- ParameterCollection.cs
- DataContractSerializer.cs
- ValidationEventArgs.cs
- PropertyValue.cs
- SchemaImporterExtension.cs
- EndpointDispatcher.cs
- OperatingSystem.cs
- BoundingRectTracker.cs
- GridViewPageEventArgs.cs
- SerializationEventsCache.cs
- ProtocolsConfigurationHandler.cs
- LogRestartAreaEnumerator.cs
- CodePropertyReferenceExpression.cs
- ProfileSettingsCollection.cs
- ConfigurationValue.cs
- SynchronizingStream.cs
- CatalogPartChrome.cs
- ContextStack.cs
- ColorConvertedBitmap.cs
- UnitySerializationHolder.cs
- LocalizableResourceBuilder.cs
- EntityCommandCompilationException.cs
- DecoderNLS.cs
- DiscoveryReference.cs
- SegmentInfo.cs
- URLAttribute.cs
- HashCodeCombiner.cs
- OracleConnection.cs
- LocatorPartList.cs
- FilterElement.cs
- SessionStateSection.cs
- EdmValidator.cs
- APCustomTypeDescriptor.cs
- ExtendedPropertyInfo.cs
- RawKeyboardInputReport.cs
- HttpCapabilitiesSectionHandler.cs
- TreeNodeCollection.cs
- XmlSchemaSimpleTypeList.cs
- XmlRawWriterWrapper.cs
- PrtTicket_Public.cs
- SymbolEqualComparer.cs
- NavigationProperty.cs
- DbBuffer.cs
- ReadOnlyAttribute.cs
- SqlTopReducer.cs
- Image.cs
- OdbcRowUpdatingEvent.cs
- NonParentingControl.cs
- VSDExceptions.cs
- RegistryExceptionHelper.cs
- Int32Storage.cs
- ParagraphResult.cs
- TabControlCancelEvent.cs
- SimpleModelProvider.cs
- ConfigurationManager.cs
- ConnectionManagementElement.cs
- XmlSchemaSimpleType.cs
- HtmlInputFile.cs
- PropertyMap.cs
- Base64Decoder.cs
- PartialTrustValidationBehavior.cs
- MemoryPressure.cs
- DesignTimeTemplateParser.cs
- SystemException.cs
- httpapplicationstate.cs
- RenderContext.cs
- UrlRoutingModule.cs
- UserNameServiceElement.cs
- CounterSample.cs
- X509ChainElement.cs
- SmiContext.cs
- TransactionChannelFaultConverter.cs
- OperatingSystem.cs
- StopStoryboard.cs
- Dispatcher.cs
- Internal.cs
- ClassHandlersStore.cs
- ImageClickEventArgs.cs
- CompModSwitches.cs
- DataControlFieldCell.cs
- ListViewCommandEventArgs.cs
- PolyBezierSegmentFigureLogic.cs
- BitmapCacheBrush.cs
- AbstractSvcMapFileLoader.cs
- WebPartConnectionsConfigureVerb.cs
- HtmlCalendarAdapter.cs
- SemaphoreSecurity.cs
- Helpers.cs
- TypeValidationEventArgs.cs
- HMACSHA1.cs
- IItemContainerGenerator.cs
- ScriptDescriptor.cs
- TextEditorContextMenu.cs
- Recipient.cs
- DrawingDrawingContext.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- SurrogateChar.cs
- DeferredReference.cs
- WebPartDisplayModeCancelEventArgs.cs
- StylusPointPropertyInfo.cs