Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Rect3D.cs
- WindowsFormsDesignerOptionService.cs
- ListParaClient.cs
- XmlObjectSerializer.cs
- RegularExpressionValidator.cs
- HtmlListAdapter.cs
- AlternateView.cs
- KeyNotFoundException.cs
- DisplayMemberTemplateSelector.cs
- EventSetterHandlerConverter.cs
- Nodes.cs
- DescendantBaseQuery.cs
- TextEffectResolver.cs
- ObjectConverter.cs
- MergeLocalizationDirectives.cs
- NativeMethods.cs
- DataGridTablesFactory.cs
- TreeNodeStyleCollection.cs
- AutomationIdentifierGuids.cs
- AccessDataSource.cs
- MethodToken.cs
- XmlTypeAttribute.cs
- RegexGroup.cs
- MarkupProperty.cs
- SvcMapFileLoader.cs
- Win32Native.cs
- DictionaryContent.cs
- DataGridColumnCollection.cs
- ResourceSet.cs
- ListViewItemSelectionChangedEvent.cs
- PackageProperties.cs
- Visual3D.cs
- BasicExpandProvider.cs
- HttpCachePolicyElement.cs
- UpDownBase.cs
- ConnectionsZone.cs
- DragEvent.cs
- DataRowExtensions.cs
- XmlSchemas.cs
- EventHandlersStore.cs
- PerformanceCounterScope.cs
- TreeViewBindingsEditor.cs
- PerformanceCounterTraceRecord.cs
- EntityContainerAssociationSet.cs
- TextClipboardData.cs
- GeneralTransform3DTo2DTo3D.cs
- ProviderConnectionPointCollection.cs
- TdsParser.cs
- TransformerInfo.cs
- OpacityConverter.cs
- SecurityChannel.cs
- _TransmitFileOverlappedAsyncResult.cs
- ContentType.cs
- GZipStream.cs
- CheckBoxStandardAdapter.cs
- RequestTimeoutManager.cs
- LayoutTableCell.cs
- DLinqAssociationProvider.cs
- SQLStringStorage.cs
- RuleProcessor.cs
- SmiMetaData.cs
- Vector.cs
- ParseChildrenAsPropertiesAttribute.cs
- CacheMode.cs
- PresentationAppDomainManager.cs
- ToolboxItemWrapper.cs
- SchemaContext.cs
- MimeMultiPart.cs
- BatchWriter.cs
- TextFormatterImp.cs
- CodeCatchClause.cs
- Literal.cs
- EventLogPermissionEntryCollection.cs
- SqlGatherConsumedAliases.cs
- AmbientProperties.cs
- WizardPanel.cs
- oledbmetadatacolumnnames.cs
- InkCanvasAutomationPeer.cs
- DeflateEmulationStream.cs
- CommonObjectSecurity.cs
- SHA256.cs
- ShaderRenderModeValidation.cs
- TextPointerBase.cs
- SortQuery.cs
- EntityViewGenerationConstants.cs
- COM2IDispatchConverter.cs
- recordstatefactory.cs
- ViewPort3D.cs
- DataServices.cs
- WeakReferenceList.cs
- UriTemplateTrieNode.cs
- SymbolEqualComparer.cs
- SecurityHeaderLayout.cs
- SamlSecurityTokenAuthenticator.cs
- RIPEMD160Managed.cs
- TextEditorLists.cs
- GZipDecoder.cs
- AnnotationComponentManager.cs
- EnvironmentPermission.cs
- processwaithandle.cs