Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- StylusPointProperty.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- CompilationPass2Task.cs
- Activity.cs
- SharedPersonalizationStateInfo.cs
- SQLChars.cs
- BuildProviderAppliesToAttribute.cs
- AccessText.cs
- HttpStaticObjectsCollectionBase.cs
- UnauthorizedWebPart.cs
- HashCodeCombiner.cs
- SelectionGlyph.cs
- DiagnosticsConfigurationHandler.cs
- PageThemeCodeDomTreeGenerator.cs
- MasterPage.cs
- XmlIterators.cs
- XmlEnumAttribute.cs
- ComponentCommands.cs
- HttpCapabilitiesSectionHandler.cs
- compensatingcollection.cs
- PersonalizationProviderCollection.cs
- NativeObjectSecurity.cs
- StringUtil.cs
- OneOfElement.cs
- MediaSystem.cs
- EncryptedType.cs
- DynamicRendererThreadManager.cs
- JpegBitmapDecoder.cs
- CodeTypeConstructor.cs
- HttpWriter.cs
- SelectionProcessor.cs
- CanExecuteRoutedEventArgs.cs
- COM2PropertyDescriptor.cs
- PropertyInformation.cs
- ToolboxBitmapAttribute.cs
- Screen.cs
- ColorDialog.cs
- GeometryModel3D.cs
- InfoCardListRequest.cs
- CaretElement.cs
- BypassElement.cs
- XmlExtensionFunction.cs
- UseAttributeSetsAction.cs
- StrongNameMembershipCondition.cs
- LinqMaximalSubtreeNominator.cs
- IRCollection.cs
- XmlSchemaObject.cs
- TreeNodeStyle.cs
- ExpressionBindings.cs
- ObjectViewEntityCollectionData.cs
- DoubleLink.cs
- AspCompat.cs
- DesignSurfaceEvent.cs
- DataPointer.cs
- SafeCryptContextHandle.cs
- MobileControl.cs
- KnownBoxes.cs
- RTLAwareMessageBox.cs
- SoapMessage.cs
- Misc.cs
- ImageAutomationPeer.cs
- TargetFrameworkUtil.cs
- BehaviorDragDropEventArgs.cs
- ZipFileInfo.cs
- ListViewItem.cs
- XPathMultyIterator.cs
- SystemResourceHost.cs
- _NetRes.cs
- FloatUtil.cs
- StreamSecurityUpgradeInitiator.cs
- XamlSerializerUtil.cs
- DodSequenceMerge.cs
- ZipPackagePart.cs
- BuilderInfo.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- QilGenerator.cs
- FixedSOMTableCell.cs
- TextDecoration.cs
- Soap12FormatExtensions.cs
- WebPartConnectionsCancelEventArgs.cs
- SrgsRulesCollection.cs
- ExplicitDiscriminatorMap.cs
- RedirectionProxy.cs
- InlineCollection.cs
- DependencySource.cs
- SecurityImpersonationBehavior.cs
- SharedStatics.cs
- TraceLevelStore.cs
- SyndicationCategory.cs
- login.cs
- ObjectItemCachedAssemblyLoader.cs
- IssuedTokenParametersEndpointAddressElement.cs
- CompilerCollection.cs
- HierarchicalDataSourceControl.cs
- ResizeGrip.cs
- EngineSiteSapi.cs
- FontStretchConverter.cs
- TextServicesProperty.cs
- SQLSingleStorage.cs
- WebPartTransformerCollection.cs