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
- BitmapEffectOutputConnector.cs
- RichTextBox.cs
- ImageSourceConverter.cs
- SqlTopReducer.cs
- WindowsFont.cs
- BitmapCacheBrush.cs
- Font.cs
- EventLog.cs
- KeyboardEventArgs.cs
- FixedTextView.cs
- WebReferencesBuildProvider.cs
- DSACryptoServiceProvider.cs
- SiteOfOriginPart.cs
- ResourceExpression.cs
- UIntPtr.cs
- ConfigurationStrings.cs
- AccessDataSourceView.cs
- ClickablePoint.cs
- streamingZipPartStream.cs
- MouseOverProperty.cs
- AlignmentXValidation.cs
- UserInitiatedNavigationPermission.cs
- SqlHelper.cs
- WebPartDescription.cs
- SqlNotificationEventArgs.cs
- PageContent.cs
- ProfileModule.cs
- ComponentEditorForm.cs
- RuleSetCollection.cs
- Permission.cs
- RegisteredArrayDeclaration.cs
- ReadWriteObjectLock.cs
- TextMetrics.cs
- PlanCompiler.cs
- VirtualPathUtility.cs
- SoapSchemaImporter.cs
- TextMarkerSource.cs
- OleDbConnectionInternal.cs
- WebScriptClientGenerator.cs
- IdentifierService.cs
- SemanticAnalyzer.cs
- SessionStateContainer.cs
- ScriptServiceAttribute.cs
- DBConnectionString.cs
- Object.cs
- TextParagraphProperties.cs
- SuppressMessageAttribute.cs
- XmlSchemaResource.cs
- TimeIntervalCollection.cs
- CssTextWriter.cs
- XmlHierarchicalDataSourceView.cs
- DataGridViewElement.cs
- ManagementNamedValueCollection.cs
- SchemaImporterExtensionElement.cs
- PageTextBox.cs
- SaveFileDialog.cs
- TdsParserSafeHandles.cs
- TableItemStyle.cs
- AllowedAudienceUriElement.cs
- IdnElement.cs
- Floater.cs
- TabControl.cs
- Encoder.cs
- DynamicPropertyHolder.cs
- OledbConnectionStringbuilder.cs
- ClientSponsor.cs
- HandleCollector.cs
- RegexReplacement.cs
- XmlConverter.cs
- DragAssistanceManager.cs
- LinqDataSource.cs
- ObjectDataSourceFilteringEventArgs.cs
- GridItemPattern.cs
- EncodingTable.cs
- SqlNotificationRequest.cs
- CallContext.cs
- JsonEncodingStreamWrapper.cs
- SemanticResolver.cs
- Point3DCollectionConverter.cs
- RealizationContext.cs
- BaseUriHelper.cs
- PasswordPropertyTextAttribute.cs
- SiteMapNodeCollection.cs
- FlowchartDesigner.xaml.cs
- RightsManagementProvider.cs
- FormViewRow.cs
- RadioButton.cs
- OutputScope.cs
- DataGridViewCellConverter.cs
- TargetFrameworkUtil.cs
- SerializationFieldInfo.cs
- BackStopAuthenticationModule.cs
- XXXOnTypeBuilderInstantiation.cs
- CorrelationKey.cs
- MsmqOutputChannel.cs
- XmlMessageFormatter.cs
- BamlRecordHelper.cs
- QueryResults.cs
- XmlChoiceIdentifierAttribute.cs
- IntSecurity.cs