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
- Serializer.cs
- ImageFormatConverter.cs
- DataSourceView.cs
- VerticalAlignConverter.cs
- HtmlSelect.cs
- PropertyBuilder.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DiscoveryVersion.cs
- JapaneseLunisolarCalendar.cs
- InternalsVisibleToAttribute.cs
- DataListItemEventArgs.cs
- Decoder.cs
- CellConstant.cs
- HttpCachePolicy.cs
- XmlDataSourceNodeDescriptor.cs
- Rect3D.cs
- ClassGenerator.cs
- Crc32Helper.cs
- SpeechDetectedEventArgs.cs
- XmlCharCheckingWriter.cs
- QueryActivatableWorkflowsCommand.cs
- FunctionImportElement.cs
- TextLineResult.cs
- WindowsRegion.cs
- XmlResolver.cs
- ResourceManager.cs
- QueryableDataSource.cs
- ClientSideQueueItem.cs
- InternalConfigHost.cs
- EventProviderWriter.cs
- LinkedList.cs
- QuestionEventArgs.cs
- ScrollBar.cs
- ReferenceConverter.cs
- EventTrigger.cs
- FrameworkContentElementAutomationPeer.cs
- GroupBoxRenderer.cs
- StyleBamlTreeBuilder.cs
- util.cs
- ResourceDescriptionAttribute.cs
- DragStartedEventArgs.cs
- CatalogPartChrome.cs
- CustomCategoryAttribute.cs
- NamespaceDisplay.xaml.cs
- ConfigsHelper.cs
- CriticalHandle.cs
- TreeView.cs
- StructuralCache.cs
- CollectionDataContractAttribute.cs
- IsolatedStorageFile.cs
- ComPlusSynchronizationContext.cs
- OdbcTransaction.cs
- SchemaImporterExtensionElement.cs
- MessageQueue.cs
- TransactionsSectionGroup.cs
- TextEditorCharacters.cs
- BatchStream.cs
- TypeSystem.cs
- DynamicDataRoute.cs
- ApplicationException.cs
- Int16Converter.cs
- TypeDescriptorFilterService.cs
- EdmType.cs
- FixedSOMPageConstructor.cs
- TextOnlyOutput.cs
- MgmtResManager.cs
- LayoutEngine.cs
- ToolStripSeparator.cs
- SeverityFilter.cs
- PlatformNotSupportedException.cs
- DES.cs
- MediaSystem.cs
- Validator.cs
- HostingEnvironmentSection.cs
- ReferencedAssembly.cs
- WindowsEditBoxRange.cs
- PageRequestManager.cs
- ResXDataNode.cs
- SettingsPropertyValueCollection.cs
- FileLogRecordHeader.cs
- TabPage.cs
- GridEntryCollection.cs
- EntityDataSourceColumn.cs
- XmlNavigatorStack.cs
- XmlNamespaceMapping.cs
- ClientTargetCollection.cs
- ErrorStyle.cs
- HTTPNotFoundHandler.cs
- StringValidatorAttribute.cs
- CSharpCodeProvider.cs
- ViewPort3D.cs
- HTMLTagNameToTypeMapper.cs
- RoutedEventArgs.cs
- LogArchiveSnapshot.cs
- AuthorizationRuleCollection.cs
- StorageScalarPropertyMapping.cs
- ScrollEventArgs.cs
- WebPartDescriptionCollection.cs
- ParserStreamGeometryContext.cs
- XmlNamespaceMapping.cs