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
- StringArrayConverter.cs
- HandlerFactoryCache.cs
- SettingsPropertyValue.cs
- RtType.cs
- DataSourceSelectArguments.cs
- ParallelForEach.cs
- XmlCharCheckingWriter.cs
- ServicePointManagerElement.cs
- GridEntry.cs
- Setter.cs
- CheckBox.cs
- ImageMap.cs
- MimeTypePropertyAttribute.cs
- CodeVariableReferenceExpression.cs
- SwitchAttribute.cs
- Table.cs
- AsymmetricCryptoHandle.cs
- DelegatingConfigHost.cs
- MDIClient.cs
- ConcatQueryOperator.cs
- SendMailErrorEventArgs.cs
- ObjectQueryExecutionPlan.cs
- GAC.cs
- PropertyGridDesigner.cs
- SecurityState.cs
- ResolveNameEventArgs.cs
- InternalConfigHost.cs
- ProviderException.cs
- dataobject.cs
- FixedSOMPageConstructor.cs
- PropertyGridEditorPart.cs
- HttpEncoder.cs
- DocComment.cs
- CompModSwitches.cs
- VarRefManager.cs
- View.cs
- GrammarBuilderBase.cs
- KeyValuePairs.cs
- XdrBuilder.cs
- SimpleMailWebEventProvider.cs
- HtmlTernaryTree.cs
- XPathBuilder.cs
- ConnectionConsumerAttribute.cs
- LoadedEvent.cs
- ValidationErrorCollection.cs
- VectorCollectionValueSerializer.cs
- DataServiceKeyAttribute.cs
- SmiConnection.cs
- CodeDomLocalizationProvider.cs
- AggregationMinMaxHelpers.cs
- entityreference_tresulttype.cs
- TextServicesCompartmentContext.cs
- UrlParameterReader.cs
- HostSecurityManager.cs
- ComponentRenameEvent.cs
- ObjectTypeMapping.cs
- metadatamappinghashervisitor.cs
- figurelength.cs
- FormViewPagerRow.cs
- ResourcePermissionBase.cs
- ParserOptions.cs
- RegexWriter.cs
- BeginEvent.cs
- CreateUserWizard.cs
- ProgressBarAutomationPeer.cs
- DataComponentGenerator.cs
- QuadraticBezierSegment.cs
- EdmFunction.cs
- XmlSchemaSequence.cs
- DataGridItemEventArgs.cs
- DataGridTextBoxColumn.cs
- BaseUriHelper.cs
- Nodes.cs
- XmlSortKeyAccumulator.cs
- SettingsBindableAttribute.cs
- WebUtil.cs
- StreamUpdate.cs
- Emitter.cs
- CellTreeNode.cs
- WebPartChrome.cs
- PictureBox.cs
- XmlSchemaProviderAttribute.cs
- safemediahandle.cs
- Point.cs
- SecurityKeyIdentifier.cs
- Socket.cs
- InfoCardBaseException.cs
- WorkflowTraceTransfer.cs
- SafeBitVector32.cs
- TranslateTransform3D.cs
- RoleManagerModule.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- Message.cs
- ModelPerspective.cs
- SafeFindHandle.cs
- ServiceControllerDesigner.cs
- FormCollection.cs
- Int16Animation.cs
- HttpCachePolicy.cs
- XmlSchemaSimpleTypeRestriction.cs