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
- DataTableNameHandler.cs
- CellIdBoolean.cs
- ReferentialConstraint.cs
- GlyphCollection.cs
- TdsRecordBufferSetter.cs
- JsonSerializer.cs
- Classification.cs
- Rfc4050KeyFormatter.cs
- Object.cs
- SchemaDeclBase.cs
- securitycriticaldataformultiplegetandset.cs
- ConfigXmlWhitespace.cs
- XmlObjectSerializer.cs
- ToolStripDropDownClosingEventArgs.cs
- PackageStore.cs
- Baml2006SchemaContext.cs
- RootAction.cs
- NavigateEvent.cs
- Point3DIndependentAnimationStorage.cs
- CaseStatementProjectedSlot.cs
- StringSource.cs
- EntityContainerAssociationSetEnd.cs
- DataKey.cs
- SqlClientWrapperSmiStreamChars.cs
- TransactionContextManager.cs
- GenerateScriptTypeAttribute.cs
- ValueQuery.cs
- DataGridColumnCollection.cs
- OdbcInfoMessageEvent.cs
- TcpWorkerProcess.cs
- ProfessionalColors.cs
- ListBindingHelper.cs
- DynamicResourceExtension.cs
- RectangleF.cs
- ResXResourceSet.cs
- MimeTypePropertyAttribute.cs
- Win32Native.cs
- PeerInvitationResponse.cs
- _HelperAsyncResults.cs
- XPathNodeIterator.cs
- HttpRequestCacheValidator.cs
- TextBoxRenderer.cs
- PropertyItem.cs
- TraceSection.cs
- DataServices.cs
- PropertyRecord.cs
- CodeSnippetTypeMember.cs
- ISAPIApplicationHost.cs
- EndpointAddressProcessor.cs
- ComplexType.cs
- Bezier.cs
- DataObjectPastingEventArgs.cs
- MailDefinition.cs
- IntSecurity.cs
- ECDiffieHellmanPublicKey.cs
- AbstractDataSvcMapFileLoader.cs
- StringUtil.cs
- InputReport.cs
- RestHandler.cs
- Latin1Encoding.cs
- RotateTransform.cs
- FilterableAttribute.cs
- Polygon.cs
- SlipBehavior.cs
- Base64Encoder.cs
- TreeWalkHelper.cs
- SecurityKeyEntropyMode.cs
- MethodSet.cs
- ScrollChrome.cs
- AnnotationResourceChangedEventArgs.cs
- MultiView.cs
- Repeater.cs
- ListBoxAutomationPeer.cs
- SecurityPolicySection.cs
- CompiledIdentityConstraint.cs
- SourceChangedEventArgs.cs
- GatewayDefinition.cs
- NativeCppClassAttribute.cs
- _UriTypeConverter.cs
- BitmapFrameEncode.cs
- DataServiceExpressionVisitor.cs
- NotCondition.cs
- PrintingPermission.cs
- WebConfigurationHost.cs
- ItemList.cs
- TcpProcessProtocolHandler.cs
- UnsafeNativeMethods.cs
- WebContext.cs
- RadioButton.cs
- EventsTab.cs
- PrimitiveOperationFormatter.cs
- SqlUdtInfo.cs
- XmlPreloadedResolver.cs
- SqlDataSourceConnectionPanel.cs
- TraceFilter.cs
- ToolboxCategory.cs
- CodeArrayIndexerExpression.cs
- SecurityToken.cs
- PartManifestEntry.cs
- ToolStripItemBehavior.cs