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
- AssociativeAggregationOperator.cs
- Animatable.cs
- ExpressionTable.cs
- GuidConverter.cs
- PropertyMappingExceptionEventArgs.cs
- MessageSecurityOverTcp.cs
- MetadataArtifactLoaderComposite.cs
- StorageEntitySetMapping.cs
- AttributeTableBuilder.cs
- ContextBase.cs
- DeferredElementTreeState.cs
- GACIdentityPermission.cs
- WebPartDescriptionCollection.cs
- XmlCompatibilityReader.cs
- JournalEntryListConverter.cs
- Visitor.cs
- PictureBox.cs
- TypeSystem.cs
- TextDecorationUnitValidation.cs
- TypeToStringValueConverter.cs
- UIElement.cs
- EdmValidator.cs
- GridViewCommandEventArgs.cs
- DataRelation.cs
- BitmapImage.cs
- SkinBuilder.cs
- DockAndAnchorLayout.cs
- PolicyLevel.cs
- DebuggerAttributes.cs
- XmlMemberMapping.cs
- UnitySerializationHolder.cs
- OleServicesContext.cs
- HttpContext.cs
- DocumentViewer.cs
- ModuleConfigurationInfo.cs
- remotingproxy.cs
- ProfessionalColorTable.cs
- RequestNavigateEventArgs.cs
- Attributes.cs
- Process.cs
- Decimal.cs
- DependencyProperty.cs
- QilIterator.cs
- PenContext.cs
- DataGridViewSelectedColumnCollection.cs
- ConfigurationManagerHelperFactory.cs
- InternalBase.cs
- Shared.cs
- ThreadPool.cs
- InstanceValue.cs
- ToolStripMenuItem.cs
- OleDbPermission.cs
- Vertex.cs
- FileAuthorizationModule.cs
- DataGridTextBox.cs
- BulletChrome.cs
- SizeAnimation.cs
- RowToParametersTransformer.cs
- CoTaskMemHandle.cs
- DataColumn.cs
- UnsafeNativeMethodsPenimc.cs
- CodeGroup.cs
- SystemColors.cs
- MouseGestureConverter.cs
- CngProvider.cs
- IImplicitResourceProvider.cs
- CodeDomLocalizationProvider.cs
- ColorConvertedBitmapExtension.cs
- HtmlInputControl.cs
- ContentElement.cs
- RectAnimationBase.cs
- Converter.cs
- TextEditorSpelling.cs
- LongValidator.cs
- Vector3DKeyFrameCollection.cs
- QilLoop.cs
- TypefaceMap.cs
- DynamicRenderer.cs
- ProfileProvider.cs
- WorkflowServiceHostFactory.cs
- Point.cs
- XmlSerializableWriter.cs
- GuidelineCollection.cs
- ConnectionManagementElement.cs
- BypassElement.cs
- VectorAnimationUsingKeyFrames.cs
- ExpressionBindingCollection.cs
- WebPartUtil.cs
- GroupItemAutomationPeer.cs
- DocumentEventArgs.cs
- VariableQuery.cs
- GeneratedContractType.cs
- ChangesetResponse.cs
- WindowsSecurityToken.cs
- METAHEADER.cs
- NumericExpr.cs
- HeaderUtility.cs
- NullableFloatMinMaxAggregationOperator.cs
- SqlClientPermission.cs
- MetaModel.cs