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
- LayoutSettings.cs
- TextDecorationCollection.cs
- DataObjectPastingEventArgs.cs
- ListenDesigner.cs
- SchemaHelper.cs
- HasCopySemanticsAttribute.cs
- StringInfo.cs
- BadImageFormatException.cs
- ModuleBuilderData.cs
- NoneExcludedImageIndexConverter.cs
- CustomCredentialPolicy.cs
- TabControlCancelEvent.cs
- ChoiceConverter.cs
- Int32CAMarshaler.cs
- DbParameterCollectionHelper.cs
- XmlJsonWriter.cs
- AlternationConverter.cs
- ChannelServices.cs
- DataControlField.cs
- UIntPtr.cs
- ComplexTypeEmitter.cs
- TagPrefixInfo.cs
- ControlCollection.cs
- ScriptingSectionGroup.cs
- Funcletizer.cs
- WeakReadOnlyCollection.cs
- FunctionDescription.cs
- CursorConverter.cs
- GridViewDeletedEventArgs.cs
- BindingMemberInfo.cs
- SqlDuplicator.cs
- RecordBuilder.cs
- BoundPropertyEntry.cs
- ContractInferenceHelper.cs
- HandlerFactoryCache.cs
- SecureConversationVersion.cs
- ETagAttribute.cs
- GridViewRowEventArgs.cs
- RSAPKCS1SignatureFormatter.cs
- SerialStream.cs
- HtmlElementCollection.cs
- ConfigurationSchemaErrors.cs
- CompilationRelaxations.cs
- DiscoveryProxy.cs
- SessionPageStatePersister.cs
- LexicalChunk.cs
- InProcStateClientManager.cs
- NumberFormatter.cs
- NodeLabelEditEvent.cs
- EmitterCache.cs
- CodeDomConfigurationHandler.cs
- datacache.cs
- TextTreeInsertUndoUnit.cs
- DataGridView.cs
- FormsIdentity.cs
- WebAdminConfigurationHelper.cs
- FakeModelItemImpl.cs
- DockPatternIdentifiers.cs
- InstallerTypeAttribute.cs
- RequiredAttributeAttribute.cs
- WebSysDescriptionAttribute.cs
- CharEnumerator.cs
- PrePostDescendentsWalker.cs
- DataGridParentRows.cs
- AsyncDataRequest.cs
- HttpPostedFile.cs
- HtmlHead.cs
- InteropAutomationProvider.cs
- Geometry.cs
- CatalogZone.cs
- EditorPartCollection.cs
- PropertyDescriptorGridEntry.cs
- RotateTransform3D.cs
- DescendantBaseQuery.cs
- DataContext.cs
- ImpersonationContext.cs
- EventLog.cs
- List.cs
- recordstate.cs
- EncoderBestFitFallback.cs
- AnimatedTypeHelpers.cs
- ClientRolePrincipal.cs
- MILUtilities.cs
- SynchronizationLockException.cs
- OdbcErrorCollection.cs
- EditorPart.cs
- FileCodeGroup.cs
- TabControlEvent.cs
- TemplateContentLoader.cs
- ReplacementText.cs
- XPathNavigatorKeyComparer.cs
- X500Name.cs
- GroupItem.cs
- ScrollViewer.cs
- WebSysDisplayNameAttribute.cs
- FixedSOMFixedBlock.cs
- DataPointer.cs
- COM2IProvidePropertyBuilderHandler.cs
- BufferedResponseStream.cs
- AdRotator.cs