Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Schema.cs
- BooleanAnimationUsingKeyFrames.cs
- EventManager.cs
- OwnerDrawPropertyBag.cs
- DbProviderServices.cs
- StandardToolWindows.cs
- FlatButtonAppearance.cs
- SiteMapDataSourceView.cs
- DataGridRowsPresenter.cs
- FunctionUpdateCommand.cs
- ManagementQuery.cs
- Predicate.cs
- UserControlBuildProvider.cs
- PropertyAccessVisitor.cs
- _NativeSSPI.cs
- CqlGenerator.cs
- CqlParser.cs
- Utils.cs
- PrincipalPermission.cs
- BinHexDecoder.cs
- FlowStep.cs
- StaticFileHandler.cs
- HttpPostProtocolImporter.cs
- RayHitTestParameters.cs
- DuplicateWaitObjectException.cs
- PostBackTrigger.cs
- Line.cs
- SinglePhaseEnlistment.cs
- SamlAuthorizationDecisionStatement.cs
- StylusPointPropertyId.cs
- Exception.cs
- CellTreeNodeVisitors.cs
- XmlCodeExporter.cs
- Stacktrace.cs
- SqlDataSourceFilteringEventArgs.cs
- Types.cs
- FormCollection.cs
- PointLight.cs
- StateMachineWorkflowDesigner.cs
- BevelBitmapEffect.cs
- TransactedBatchContext.cs
- SBCSCodePageEncoding.cs
- XmlUtf8RawTextWriter.cs
- XmlSchemaSimpleContent.cs
- path.cs
- _TransmitFileOverlappedAsyncResult.cs
- AccessDataSourceView.cs
- InheritedPropertyChangedEventArgs.cs
- XmlNodeReader.cs
- EntityCommandExecutionException.cs
- BaseUriHelper.cs
- QueryRelOp.cs
- SpotLight.cs
- ToolboxSnapDragDropEventArgs.cs
- ReadOnlyDataSource.cs
- BatchServiceHost.cs
- DictionaryMarkupSerializer.cs
- Decimal.cs
- objectquery_tresulttype.cs
- SqlCacheDependencyDatabase.cs
- LinqDataSource.cs
- X509SubjectKeyIdentifierClause.cs
- Triplet.cs
- MultiPartWriter.cs
- CanonicalXml.cs
- XmlSchemaObject.cs
- SoapException.cs
- Intellisense.cs
- PrivilegedConfigurationManager.cs
- _Events.cs
- BindingMemberInfo.cs
- TextStore.cs
- StateItem.cs
- UnsafeNativeMethods.cs
- UInt64Converter.cs
- QueryResponse.cs
- ArrayExtension.cs
- ApplicationBuildProvider.cs
- DependencyPropertyKind.cs
- documentsequencetextpointer.cs
- XmlSecureResolver.cs
- lengthconverter.cs
- BufferAllocator.cs
- EditingCommands.cs
- COM2ColorConverter.cs
- Point3DCollectionValueSerializer.cs
- XmlRawWriterWrapper.cs
- CmsUtils.cs
- TextBlockAutomationPeer.cs
- KeyValueSerializer.cs
- FormViewInsertedEventArgs.cs
- DependencyObject.cs
- ParallelTimeline.cs
- ExpressionsCollectionConverter.cs
- MachineKey.cs
- WSDualHttpBindingCollectionElement.cs
- MembershipSection.cs
- ImpersonationOption.cs
- WebPartDeleteVerb.cs
- WebSysDisplayNameAttribute.cs