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
- ComplexTypeEmitter.cs
- Helpers.cs
- ManipulationCompletedEventArgs.cs
- Wildcard.cs
- QilReplaceVisitor.cs
- OracleBoolean.cs
- ClientProxyGenerator.cs
- ServiceBuildProvider.cs
- UpdateProgress.cs
- RequestCachingSection.cs
- ManifestSignatureInformation.cs
- _TLSstream.cs
- InputLanguage.cs
- WebPartConnectionsCancelVerb.cs
- RemoveStoryboard.cs
- DesignerGenericWebPart.cs
- CompilerParameters.cs
- DataFormat.cs
- ThrowHelper.cs
- DataColumn.cs
- HandlerWithFactory.cs
- IgnoreFileBuildProvider.cs
- RequestTimeoutManager.cs
- ButtonPopupAdapter.cs
- TransformProviderWrapper.cs
- ZeroOpNode.cs
- OdbcEnvironmentHandle.cs
- WmlPageAdapter.cs
- ListChangedEventArgs.cs
- XmlCharCheckingReader.cs
- CodeConditionStatement.cs
- BasePattern.cs
- DbLambda.cs
- XhtmlTextWriter.cs
- EncryptedPackageFilter.cs
- SingleObjectCollection.cs
- ApplicationDirectory.cs
- ActivityBindForm.Designer.cs
- XslVisitor.cs
- DecoderFallbackWithFailureFlag.cs
- SQLCharsStorage.cs
- SetStoryboardSpeedRatio.cs
- ScriptingScriptResourceHandlerSection.cs
- DataTemplateSelector.cs
- AlignmentYValidation.cs
- ProtocolsConfigurationEntry.cs
- DesignerDataTableBase.cs
- TraceListeners.cs
- IsolatedStorage.cs
- SecurityContext.cs
- SimpleNameService.cs
- XamlBuildProvider.cs
- StateMachine.cs
- GatewayIPAddressInformationCollection.cs
- PackWebResponse.cs
- WindowsSpinner.cs
- DropDownButton.cs
- MinimizableAttributeTypeConverter.cs
- DBNull.cs
- PerformanceCounterPermissionEntry.cs
- BidOverLoads.cs
- EntityWrapper.cs
- Point.cs
- CompilationPass2TaskInternal.cs
- BaseInfoTable.cs
- HuffModule.cs
- LabelLiteral.cs
- ObjectDataSourceChooseTypePanel.cs
- RuleCache.cs
- ReturnEventArgs.cs
- ReferenceTypeElement.cs
- WebPartHelpVerb.cs
- ACL.cs
- IBuiltInEvidence.cs
- UnsafeNativeMethods.cs
- LayoutEngine.cs
- BuildResultCache.cs
- SetMemberBinder.cs
- ProfileParameter.cs
- DbDataAdapter.cs
- WindowInteractionStateTracker.cs
- wgx_commands.cs
- BodyGlyph.cs
- HotCommands.cs
- BindableAttribute.cs
- XmlSerializer.cs
- NameScopePropertyAttribute.cs
- XmlChildNodes.cs
- ChannelManager.cs
- SystemParameters.cs
- CodeDelegateInvokeExpression.cs
- CustomErrorCollection.cs
- DesignerProperties.cs
- DbConnectionPool.cs
- ReturnValue.cs
- TextTreePropertyUndoUnit.cs
- TimeIntervalCollection.cs
- FontResourceCache.cs
- Rect.cs
- LoginView.cs