Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- WindowsClaimSet.cs
- TextRunCacheImp.cs
- PeerCollaborationPermission.cs
- SqlTypeConverter.cs
- TextShapeableCharacters.cs
- PageThemeBuildProvider.cs
- WizardSideBarListControlItemEventArgs.cs
- MtomMessageEncodingBindingElement.cs
- AudienceUriMode.cs
- TypeSystem.cs
- PkcsMisc.cs
- XmlProcessingInstruction.cs
- ClientScriptManager.cs
- InputMethodStateChangeEventArgs.cs
- ObjectNavigationPropertyMapping.cs
- CompiledRegexRunner.cs
- Material.cs
- Vector3DCollection.cs
- FlowLayoutSettings.cs
- DLinqColumnProvider.cs
- RemoteWebConfigurationHost.cs
- SortDescription.cs
- HttpHandlerAction.cs
- WindowsUpDown.cs
- DetailsViewModeEventArgs.cs
- ADMembershipProvider.cs
- DiscoveryDocumentReference.cs
- PropertyIdentifier.cs
- RayHitTestParameters.cs
- WebServiceMethodData.cs
- XmlArrayItemAttribute.cs
- CheckBoxField.cs
- GridViewDeleteEventArgs.cs
- ErrorHandler.cs
- DefaultMemberAttribute.cs
- linebase.cs
- InvokeHandlers.cs
- OrderingQueryOperator.cs
- XmlSchemaAttribute.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ThicknessKeyFrameCollection.cs
- LocalizedNameDescriptionPair.cs
- ControlEvent.cs
- MemberHolder.cs
- ValidationErrorCollection.cs
- FontStyles.cs
- DocumentPageView.cs
- IConvertible.cs
- Vector3DCollectionConverter.cs
- DragDeltaEventArgs.cs
- webproxy.cs
- DataSetMappper.cs
- WSMessageEncoding.cs
- SqlProviderManifest.cs
- NeutralResourcesLanguageAttribute.cs
- FilteredSchemaElementLookUpTable.cs
- FileDialog_Vista.cs
- SmiEventStream.cs
- HierarchicalDataBoundControl.cs
- safemediahandle.cs
- NonceCache.cs
- CurrencyManager.cs
- ArcSegment.cs
- DefaultShape.cs
- TransformerTypeCollection.cs
- WebPartZoneBase.cs
- AssemblyCache.cs
- ConvertBinder.cs
- EntityConnection.cs
- QuadraticBezierSegment.cs
- DefaultObjectSerializer.cs
- DesignerMetadata.cs
- MouseEventArgs.cs
- DetailsViewCommandEventArgs.cs
- DSASignatureDeformatter.cs
- RadioButtonPopupAdapter.cs
- TextElementCollectionHelper.cs
- CursorConverter.cs
- EncodingConverter.cs
- HwndStylusInputProvider.cs
- CSharpCodeProvider.cs
- HMACSHA384.cs
- DCSafeHandle.cs
- CommandBindingCollection.cs
- GorillaCodec.cs
- ComplusTypeValidator.cs
- MailHeaderInfo.cs
- QuadraticEase.cs
- BoolExpressionVisitors.cs
- DataGrid.cs
- TemplateManager.cs
- SoapExtensionReflector.cs
- followingquery.cs
- BooleanSwitch.cs
- TextPattern.cs
- TableCellCollection.cs
- WeakRefEnumerator.cs
- CodeCatchClauseCollection.cs
- StrongName.cs
- SystemIcmpV6Statistics.cs