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
- WCFModelStrings.Designer.cs
- Brush.cs
- XslTransform.cs
- ExpressionBinding.cs
- WebPartsPersonalization.cs
- RoutedEventHandlerInfo.cs
- TextContainerHelper.cs
- Soap12ServerProtocol.cs
- CoreChannel.cs
- TextTrailingCharacterEllipsis.cs
- EntityExpressionVisitor.cs
- SponsorHelper.cs
- querybuilder.cs
- SiteMap.cs
- DbConvert.cs
- IntegerValidator.cs
- OutputCacheSettings.cs
- DynamicUpdateCommand.cs
- LayoutInformation.cs
- WinFormsSecurity.cs
- WindowsSidIdentity.cs
- FrameworkPropertyMetadata.cs
- NamespaceQuery.cs
- HtmlUtf8RawTextWriter.cs
- OrderablePartitioner.cs
- Completion.cs
- DependencyPropertyChangedEventArgs.cs
- BookmarkScope.cs
- DiffuseMaterial.cs
- DefaultObjectMappingItemCollection.cs
- AnimationLayer.cs
- ContentPosition.cs
- CodeSubDirectoriesCollection.cs
- XmlDocumentFragment.cs
- OlePropertyStructs.cs
- PackUriHelper.cs
- DrawingVisualDrawingContext.cs
- HtmlUtf8RawTextWriter.cs
- ProtocolsConfigurationEntry.cs
- X509SubjectKeyIdentifierClause.cs
- ResXResourceWriter.cs
- BooleanFunctions.cs
- PermissionSet.cs
- UnknownWrapper.cs
- CompilationLock.cs
- CfgParser.cs
- OleDbConnection.cs
- CollectionView.cs
- GatewayIPAddressInformationCollection.cs
- DrawingContext.cs
- DesignerActionPropertyItem.cs
- TemplatedWizardStep.cs
- SQLGuid.cs
- ProgressBar.cs
- EntityDataSourceContextCreatingEventArgs.cs
- EnumValidator.cs
- _SafeNetHandles.cs
- GridViewCellAutomationPeer.cs
- EntityException.cs
- IconEditor.cs
- TdsParserStaticMethods.cs
- EdmComplexPropertyAttribute.cs
- BinaryMethodMessage.cs
- ListViewItem.cs
- UrlAuthFailedErrorFormatter.cs
- HotSpot.cs
- SspiHelper.cs
- PropertyGridDesigner.cs
- GridViewCellAutomationPeer.cs
- _NegoStream.cs
- DBAsyncResult.cs
- COM2IDispatchConverter.cs
- DirtyTextRange.cs
- ColumnPropertiesGroup.cs
- SoapDocumentServiceAttribute.cs
- GenericUriParser.cs
- CompiledAction.cs
- CollectionDataContractAttribute.cs
- XmlBinaryReader.cs
- MarkedHighlightComponent.cs
- itemelement.cs
- WindowsClaimSet.cs
- ClientScriptItemCollection.cs
- ConnectionInterfaceCollection.cs
- SamlAuthorityBinding.cs
- DesignParameter.cs
- HashSetEqualityComparer.cs
- Rotation3DAnimationBase.cs
- AdCreatedEventArgs.cs
- MetafileHeader.cs
- XpsSerializerWriter.cs
- SystemWebCachingSectionGroup.cs
- ContentValidator.cs
- UxThemeWrapper.cs
- AxImporter.cs
- DataSourceControlBuilder.cs
- DocumentProperties.cs
- FacetValueContainer.cs
- DesignerAdapterAttribute.cs
- TextWriterTraceListener.cs