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
- UriTemplateMatchException.cs
- AssemblyName.cs
- WindowsAltTab.cs
- ImageSource.cs
- Attributes.cs
- InvalidOperationException.cs
- RijndaelManagedTransform.cs
- AppSettings.cs
- DesignTimeTemplateParser.cs
- SqlFunctionAttribute.cs
- WizardStepBase.cs
- EntityDataSourceSelectedEventArgs.cs
- OdbcTransaction.cs
- ReadOnlyDataSourceView.cs
- KeySpline.cs
- ToolboxItemAttribute.cs
- CategoriesDocument.cs
- XmlValidatingReader.cs
- ThreadAbortException.cs
- TextBounds.cs
- SchemaImporter.cs
- SynchronizedDispatch.cs
- VerticalAlignConverter.cs
- BrowserInteropHelper.cs
- ToolStripItemClickedEventArgs.cs
- FrameworkObject.cs
- MainMenu.cs
- Variant.cs
- ConfigurationValue.cs
- SrgsElement.cs
- CardSpaceSelector.cs
- DynamicMetaObject.cs
- EntryWrittenEventArgs.cs
- SqlGenericUtil.cs
- ColumnCollection.cs
- BindingWorker.cs
- ObjectStateEntryDbDataRecord.cs
- MonthCalendar.cs
- SafeEventLogWriteHandle.cs
- UMPAttributes.cs
- XsltOutput.cs
- XmlComment.cs
- StreamWithDictionary.cs
- TreeNodeBinding.cs
- URL.cs
- FormViewModeEventArgs.cs
- FontStyle.cs
- SubtreeProcessor.cs
- TdsParameterSetter.cs
- DownloadProgressEventArgs.cs
- TableDetailsRow.cs
- SecurityPermission.cs
- PageAsyncTask.cs
- VoiceSynthesis.cs
- ContentValidator.cs
- Publisher.cs
- HttpServerChannel.cs
- dtdvalidator.cs
- AutomationElementCollection.cs
- SQLRoleProvider.cs
- DataTableReader.cs
- Assembly.cs
- DoubleStorage.cs
- Vector.cs
- TraceData.cs
- MemoryMappedFile.cs
- DataTransferEventArgs.cs
- MinimizableAttributeTypeConverter.cs
- ConfigXmlAttribute.cs
- MatrixTransform.cs
- AQNBuilder.cs
- DesignerOptionService.cs
- WebPartConnectionsDisconnectVerb.cs
- XmlAnyElementAttributes.cs
- unitconverter.cs
- UnsignedPublishLicense.cs
- HierarchicalDataSourceConverter.cs
- TypefaceCollection.cs
- TextTreeObjectNode.cs
- WebUtil.cs
- AttachmentCollection.cs
- DetailsViewCommandEventArgs.cs
- ResourceProviderFactory.cs
- FormatSettings.cs
- HTMLTextWriter.cs
- ReflectionUtil.cs
- HtmlInputPassword.cs
- ImportDesigner.xaml.cs
- LinqDataSourceContextData.cs
- complextypematerializer.cs
- PerformanceCounterCategory.cs
- GeneratedCodeAttribute.cs
- MiniMapControl.xaml.cs
- VersionPair.cs
- MDIClient.cs
- VirtualizedItemProviderWrapper.cs
- ZipFileInfo.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- RequiredAttributeAttribute.cs
- MdiWindowListStrip.cs