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
- AppSettingsReader.cs
- SocketManager.cs
- DiagnosticsElement.cs
- LocalBuilder.cs
- CustomErrorsSection.cs
- __Filters.cs
- TextRangeSerialization.cs
- TextBox.cs
- WebPartEditVerb.cs
- UpdateManifestForBrowserApplication.cs
- LayoutEditorPart.cs
- VBIdentifierNameEditor.cs
- RelationshipEndCollection.cs
- SignatureHelper.cs
- CloseSequenceResponse.cs
- KeyInstance.cs
- CodeAccessPermission.cs
- ViewBase.cs
- WebBrowsableAttribute.cs
- ExpressionEvaluator.cs
- Type.cs
- ThrowHelper.cs
- BrowserDefinition.cs
- IntSecurity.cs
- UIPropertyMetadata.cs
- WinFormsSecurity.cs
- EntityWrapper.cs
- ButtonDesigner.cs
- Dump.cs
- PersianCalendar.cs
- IpcChannelHelper.cs
- SamlDelegatingWriter.cs
- BooleanFunctions.cs
- Int64.cs
- MembershipSection.cs
- IUnknownConstantAttribute.cs
- ToolboxItem.cs
- WebBrowsableAttribute.cs
- Vector.cs
- EraserBehavior.cs
- NumericUpDown.cs
- XmlSchemaSimpleContentExtension.cs
- WebResponse.cs
- SqlCachedBuffer.cs
- _RequestCacheProtocol.cs
- ErrorRuntimeConfig.cs
- SoundPlayerAction.cs
- XhtmlConformanceSection.cs
- D3DImage.cs
- GroupBoxRenderer.cs
- ObjectAnimationBase.cs
- autovalidator.cs
- SqlClientMetaDataCollectionNames.cs
- TreeViewEvent.cs
- GroupDescription.cs
- EntitySqlQueryCacheKey.cs
- XamlDebuggerXmlReader.cs
- CollectionsUtil.cs
- CharacterHit.cs
- UnsafeNativeMethods.cs
- AnimatedTypeHelpers.cs
- SQLMoney.cs
- _AuthenticationState.cs
- ToolStripSystemRenderer.cs
- MarkupExtensionReturnTypeAttribute.cs
- GridViewSortEventArgs.cs
- StringWriter.cs
- HierarchicalDataSourceControl.cs
- WindowsIdentity.cs
- MultilineStringConverter.cs
- MaskedTextProvider.cs
- Attributes.cs
- HybridDictionary.cs
- FixedDSBuilder.cs
- RenderData.cs
- RootBrowserWindow.cs
- AutoGeneratedField.cs
- CngUIPolicy.cs
- InstanceDescriptor.cs
- ContentOperations.cs
- GroupQuery.cs
- DependsOnAttribute.cs
- URLMembershipCondition.cs
- Transform3DGroup.cs
- TypographyProperties.cs
- Aggregates.cs
- QilInvokeEarlyBound.cs
- PolicyLevel.cs
- IssuanceLicense.cs
- TextBoxView.cs
- Completion.cs
- ConfigsHelper.cs
- PipelineDeploymentState.cs
- BeginCreateSecurityTokenRequest.cs
- HtmlControl.cs
- TextTreeExtractElementUndoUnit.cs
- HtmlTable.cs
- TextTreeRootNode.cs
- ToolStripProgressBar.cs
- ExpressionVisitorHelpers.cs