Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataGridPageChangedEventArgs.cs
- PropertyGrid.cs
- StaticFileHandler.cs
- BinaryQueryOperator.cs
- TextStore.cs
- ConfigXmlReader.cs
- MethodCallTranslator.cs
- PropertyFilterAttribute.cs
- IListConverters.cs
- DiscriminatorMap.cs
- ConnectionPoolRegistry.cs
- XmlReader.cs
- KnownTypesProvider.cs
- HtmlTable.cs
- DbExpressionVisitor.cs
- LOSFormatter.cs
- ImageListUtils.cs
- HotSpotCollection.cs
- SecurityTokenResolver.cs
- TextViewElement.cs
- ControlCachePolicy.cs
- SqlBulkCopyColumnMapping.cs
- Visitors.cs
- RegionData.cs
- PassportAuthentication.cs
- EntityDesignerUtils.cs
- FileSystemEventArgs.cs
- FormatConvertedBitmap.cs
- CapabilitiesRule.cs
- WorkerRequest.cs
- HtmlTable.cs
- XmlPreloadedResolver.cs
- Wildcard.cs
- SemanticTag.cs
- SqlFileStream.cs
- CodeDomLocalizationProvider.cs
- CapabilitiesSection.cs
- DrawListViewColumnHeaderEventArgs.cs
- AncestorChangedEventArgs.cs
- HttpServerProtocol.cs
- SqlParameter.cs
- SafeArrayTypeMismatchException.cs
- ColorBlend.cs
- XmlSchemaAnyAttribute.cs
- AuthorizationRule.cs
- XmlSchemaInferenceException.cs
- SemanticValue.cs
- CodeGotoStatement.cs
- RowSpanVector.cs
- UIElementIsland.cs
- ValueTypeIndexerReference.cs
- SpellCheck.cs
- IPEndPoint.cs
- PeerNameRecordCollection.cs
- Delay.cs
- ExpandButtonVisibilityConverter.cs
- FormView.cs
- BufferBuilder.cs
- isolationinterop.cs
- CompiledQuery.cs
- SystemGatewayIPAddressInformation.cs
- ClientConfigurationHost.cs
- ParallelEnumerable.cs
- PrintingPermissionAttribute.cs
- SemaphoreFullException.cs
- RelationshipSet.cs
- XsltException.cs
- CultureInfo.cs
- SecurityElement.cs
- NodeFunctions.cs
- SettingsAttributeDictionary.cs
- RoleManagerModule.cs
- HttpRequestCacheValidator.cs
- ReadingWritingEntityEventArgs.cs
- CodeCatchClause.cs
- TimelineGroup.cs
- ZipIOExtraFieldPaddingElement.cs
- ImpersonateTokenRef.cs
- Int32CollectionConverter.cs
- ReliableOutputSessionChannel.cs
- SQLDateTime.cs
- HttpDebugHandler.cs
- XPathDocument.cs
- SqlCacheDependency.cs
- AdRotator.cs
- DefaultExpression.cs
- WebPartTransformerCollection.cs
- shaper.cs
- MemoryRecordBuffer.cs
- WorkflowStateRollbackService.cs
- Debug.cs
- ThousandthOfEmRealDoubles.cs
- ToolStripDropDownItemDesigner.cs
- Converter.cs
- KeyBinding.cs
- DPAPIProtectedConfigurationProvider.cs
- ToolStripPanelRenderEventArgs.cs
- Run.cs
- SourceFilter.cs
- XmlElementAttributes.cs