Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MdImport.cs
- HandlerFactoryWrapper.cs
- VScrollBar.cs
- RoutedEventConverter.cs
- WindowsStatic.cs
- FloaterParaClient.cs
- Stroke2.cs
- XpsFilter.cs
- DataControlLinkButton.cs
- BinaryMethodMessage.cs
- Duration.cs
- OperationParameterInfo.cs
- ObjectListItemCollection.cs
- ComplexTypeEmitter.cs
- NGCUIElementCollectionSerializerAsync.cs
- XslVisitor.cs
- EditCommandColumn.cs
- TranslateTransform.cs
- PositiveTimeSpanValidatorAttribute.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DataGridTablesFactory.cs
- Pen.cs
- NamedPipeProcessProtocolHandler.cs
- RuntimeResourceSet.cs
- DefaultTraceListener.cs
- remotingproxy.cs
- WebRequestModuleElementCollection.cs
- processwaithandle.cs
- Bidi.cs
- HatchBrush.cs
- AutoScrollExpandMessageFilter.cs
- MemoryFailPoint.cs
- NativeMethodsCLR.cs
- Source.cs
- WmpBitmapEncoder.cs
- XmlNode.cs
- LinqMaximalSubtreeNominator.cs
- XmlSchemaGroupRef.cs
- SqlDataSourceParameterParser.cs
- PrimitiveXmlSerializers.cs
- ColumnMapCopier.cs
- BookmarkOptionsHelper.cs
- RequestBringIntoViewEventArgs.cs
- PartBasedPackageProperties.cs
- CultureTableRecord.cs
- OneOfTypeConst.cs
- HttpValueCollection.cs
- Int32RectConverter.cs
- Authorization.cs
- MappingMetadataHelper.cs
- Constraint.cs
- RC2CryptoServiceProvider.cs
- Empty.cs
- BooleanStorage.cs
- DataKeyArray.cs
- WebControlAdapter.cs
- ClientConvert.cs
- MSG.cs
- LinkedResource.cs
- OracleSqlParser.cs
- XmlWrappingReader.cs
- CollectionCodeDomSerializer.cs
- PersistStreamTypeWrapper.cs
- ECDsaCng.cs
- DataGridViewButtonColumn.cs
- ConstNode.cs
- ConfigurationManagerInternal.cs
- EntitySetRetriever.cs
- AppDomainProtocolHandler.cs
- UnknownWrapper.cs
- TextWriterTraceListener.cs
- CngProvider.cs
- PropertyToken.cs
- DateBoldEvent.cs
- DivideByZeroException.cs
- BuildProviderUtils.cs
- PersonalizablePropertyEntry.cs
- SafeEventLogWriteHandle.cs
- KerberosSecurityTokenProvider.cs
- DeobfuscatingStream.cs
- Oid.cs
- mactripleDES.cs
- FastPropertyAccessor.cs
- ToolStripButton.cs
- GridView.cs
- Preprocessor.cs
- Maps.cs
- RichTextBoxAutomationPeer.cs
- NullableConverter.cs
- FindSimilarActivitiesVerb.cs
- ElementFactory.cs
- UriParserTemplates.cs
- BinaryConverter.cs
- WebPartEditVerb.cs
- IsolatedStorageFileStream.cs
- EntityStoreSchemaGenerator.cs
- HeaderedItemsControl.cs
- RegexMatch.cs
- EventSinkHelperWriter.cs
- DataGridPagerStyle.cs