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
- DataContractAttribute.cs
- FaultDescriptionCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- FlowPosition.cs
- EntitySqlQueryBuilder.cs
- XmlLanguage.cs
- OutputCacheProfile.cs
- Typeface.cs
- InternalDuplexChannelFactory.cs
- WithParamAction.cs
- WebHttpBehavior.cs
- DataColumnPropertyDescriptor.cs
- LinearGradientBrush.cs
- SettingsPropertyCollection.cs
- ClientSideProviderDescription.cs
- GridViewDeletedEventArgs.cs
- HttpCookieCollection.cs
- PreDigestedSignedInfo.cs
- DocumentViewerHelper.cs
- ProjectionPathBuilder.cs
- LinkButton.cs
- UseManagedPresentationBindingElementImporter.cs
- FunctionCommandText.cs
- Polygon.cs
- CapabilitiesAssignment.cs
- BeginStoryboard.cs
- BuilderPropertyEntry.cs
- SiteIdentityPermission.cs
- Group.cs
- FakeModelPropertyImpl.cs
- ServiceMetadataPublishingElement.cs
- UrlPath.cs
- ComplexPropertyEntry.cs
- GeneralTransform3DCollection.cs
- SafeFindHandle.cs
- _ContextAwareResult.cs
- TimeSpanStorage.cs
- WebPartZoneCollection.cs
- ContainerControl.cs
- ColumnPropertiesGroup.cs
- BrushValueSerializer.cs
- InternalsVisibleToAttribute.cs
- EncryptedReference.cs
- SingleResultAttribute.cs
- Ticks.cs
- TextBoxBase.cs
- RowToFieldTransformer.cs
- PageBuildProvider.cs
- RelOps.cs
- DESCryptoServiceProvider.cs
- ChangeDirector.cs
- ZipPackagePart.cs
- TextUtf8RawTextWriter.cs
- XslTransformFileEditor.cs
- SqlGatherProducedAliases.cs
- ActivityInstanceReference.cs
- BuildProvider.cs
- ScriptingRoleServiceSection.cs
- ReadOnlyMetadataCollection.cs
- StylusPointPropertyUnit.cs
- XsltOutput.cs
- AnimationClockResource.cs
- AudioFormatConverter.cs
- ConfigurationManagerInternalFactory.cs
- WebException.cs
- WindowsFormsHost.cs
- TextEndOfLine.cs
- XmlSchemaObject.cs
- ScrollContentPresenter.cs
- PageCatalogPartDesigner.cs
- NGCPageContentCollectionSerializerAsync.cs
- RectConverter.cs
- UrlPath.cs
- SchemaDeclBase.cs
- BaseTemplateCodeDomTreeGenerator.cs
- MethodBuilderInstantiation.cs
- Avt.cs
- ApplicationFileParser.cs
- WebPartActionVerb.cs
- ClientSponsor.cs
- DbConnectionClosed.cs
- SchemaTableColumn.cs
- MobileUserControlDesigner.cs
- XmlHierarchyData.cs
- SerializationStore.cs
- ReachDocumentPageSerializer.cs
- SchemaSetCompiler.cs
- StackSpiller.Bindings.cs
- SQLBytes.cs
- BulletDecorator.cs
- DataControlLinkButton.cs
- Reference.cs
- SchemaEntity.cs
- TripleDESCryptoServiceProvider.cs
- PassportIdentity.cs
- DocumentViewer.cs
- DropTarget.cs
- InputScopeNameConverter.cs
- UriScheme.cs
- InternalDispatchObject.cs