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
- SourceFilter.cs
- EnumType.cs
- LinearKeyFrames.cs
- StatusInfoItem.cs
- ZipIOLocalFileHeader.cs
- ChannelBinding.cs
- DocumentSchemaValidator.cs
- TransformerInfoCollection.cs
- RotateTransform3D.cs
- SchemaMapping.cs
- WindowsFormsLinkLabel.cs
- CompilerGeneratedAttribute.cs
- SecUtil.cs
- COM2PropertyPageUITypeConverter.cs
- SqlMethodTransformer.cs
- XmlElementAttributes.cs
- ParserContext.cs
- CodeParameterDeclarationExpression.cs
- DtdParser.cs
- ReceiveSecurityHeaderElementManager.cs
- TraceSwitch.cs
- CheckBox.cs
- ToolStripPanelRenderEventArgs.cs
- ExpandCollapseProviderWrapper.cs
- DrawingGroup.cs
- AttributeUsageAttribute.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- WeakReferenceList.cs
- HttpVersion.cs
- PermissionSetEnumerator.cs
- BooleanProjectedSlot.cs
- HtmlEncodedRawTextWriter.cs
- PathStreamGeometryContext.cs
- DataGridViewColumnEventArgs.cs
- DllNotFoundException.cs
- DataGridCaption.cs
- WebContext.cs
- SetIterators.cs
- LayoutUtils.cs
- FixedBufferAttribute.cs
- Point3DIndependentAnimationStorage.cs
- JoinTreeSlot.cs
- Stack.cs
- SqlDataReaderSmi.cs
- MouseButtonEventArgs.cs
- Range.cs
- DecoderReplacementFallback.cs
- ServicePerformanceCounters.cs
- EUCJPEncoding.cs
- SecurityTokenRequirement.cs
- InfoCardServiceInstallComponent.cs
- AttachedPropertyDescriptor.cs
- DataViewSettingCollection.cs
- ReverseInheritProperty.cs
- RowType.cs
- RadialGradientBrush.cs
- BitmapEffectCollection.cs
- DiscoveryClientDuplexChannel.cs
- GC.cs
- PropertyOverridesTypeEditor.cs
- SqlGatherProducedAliases.cs
- LogicalExpr.cs
- UInt64Storage.cs
- PreviewControlDesigner.cs
- SmiMetaData.cs
- SQLMoneyStorage.cs
- DesignTable.cs
- ConnectivityStatus.cs
- InProcStateClientManager.cs
- XsltArgumentList.cs
- HtmlLink.cs
- FontWeight.cs
- PackageStore.cs
- InvokeMethodActivity.cs
- tooltip.cs
- HelpKeywordAttribute.cs
- DotAtomReader.cs
- IProvider.cs
- columnmapfactory.cs
- AssemblyBuilder.cs
- BitmapSource.cs
- DataPagerCommandEventArgs.cs
- TimeSpanMinutesConverter.cs
- WindowsStatusBar.cs
- WSFederationHttpBinding.cs
- FieldCollectionEditor.cs
- FormatterServices.cs
- PopupControlService.cs
- PropertyRecord.cs
- EndpointAddress10.cs
- ToolStripRenderer.cs
- CodePropertyReferenceExpression.cs
- FamilyMapCollection.cs
- AsymmetricKeyExchangeFormatter.cs
- ConnectionInterfaceCollection.cs
- EmbeddedMailObject.cs
- PointAnimation.cs
- WebDisplayNameAttribute.cs
- MemberMaps.cs
- PowerModeChangedEventArgs.cs