Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Serialization / MemberHolder.cs / 1305376 / MemberHolder.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: MemberHolder ** ** ** Purpose: This is a lightweight class designed to hold the members ** and StreamingContext for a particular class. ** ** ============================================================*/ namespace System.Runtime.Serialization { using System.Runtime.Remoting; using System; using System.Reflection; [Serializable] internal class MemberHolder { // disable csharp compiler warning #0414: field assigned unused value #pragma warning disable 0414 internal MemberInfo[] members = null; #pragma warning restore 0414 internal Type memberType; internal StreamingContext context; internal MemberHolder(Type type, StreamingContext ctx) { memberType = type; context = ctx; } public override int GetHashCode() { return memberType.GetHashCode(); } public override bool Equals(Object obj) { if (!(obj is MemberHolder)) { return false; } MemberHolder temp = (MemberHolder)obj; if (Object.ReferenceEquals(temp.memberType, memberType) && temp.context.State == context.State) { return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: MemberHolder ** ** ** Purpose: This is a lightweight class designed to hold the members ** and StreamingContext for a particular class. ** ** ============================================================*/ namespace System.Runtime.Serialization { using System.Runtime.Remoting; using System; using System.Reflection; [Serializable] internal class MemberHolder { // disable csharp compiler warning #0414: field assigned unused value #pragma warning disable 0414 internal MemberInfo[] members = null; #pragma warning restore 0414 internal Type memberType; internal StreamingContext context; internal MemberHolder(Type type, StreamingContext ctx) { memberType = type; context = ctx; } public override int GetHashCode() { return memberType.GetHashCode(); } public override bool Equals(Object obj) { if (!(obj is MemberHolder)) { return false; } MemberHolder temp = (MemberHolder)obj; if (Object.ReferenceEquals(temp.memberType, memberType) && temp.context.State == context.State) { return true; } return false; } } } // 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
- ParameterEditorUserControl.cs
- ResourcePermissionBaseEntry.cs
- PartDesigner.cs
- SourceChangedEventArgs.cs
- Annotation.cs
- SQLByteStorage.cs
- MarginCollapsingState.cs
- MediaScriptCommandRoutedEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- EntityViewGenerationConstants.cs
- StylusPointPropertyId.cs
- OlePropertyStructs.cs
- typedescriptorpermission.cs
- AsyncOperationManager.cs
- SignatureConfirmationElement.cs
- ToolBar.cs
- ParserExtension.cs
- EventLogTraceListener.cs
- Html32TextWriter.cs
- DelegateTypeInfo.cs
- WebRequestModulesSection.cs
- _NegotiateClient.cs
- HwndSubclass.cs
- Operator.cs
- CssTextWriter.cs
- FrugalMap.cs
- ColumnClickEvent.cs
- TypeContext.cs
- Size.cs
- SortQuery.cs
- ObjectContextServiceProvider.cs
- FontEmbeddingManager.cs
- Config.cs
- EllipticalNodeOperations.cs
- future.cs
- PrimitiveDataContract.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- XmlSchemaException.cs
- StoreItemCollection.Loader.cs
- AsyncInvokeContext.cs
- AuthenticatedStream.cs
- Pen.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- EventLogger.cs
- SqlBulkCopy.cs
- ExpressionPrefixAttribute.cs
- ImageMap.cs
- XmlNamespaceManager.cs
- WebSysDefaultValueAttribute.cs
- SchemaDeclBase.cs
- FileSystemEventArgs.cs
- EditBehavior.cs
- FileFormatException.cs
- SqlConnectionFactory.cs
- SoapReflectionImporter.cs
- BindToObject.cs
- EntitySqlQueryCacheEntry.cs
- AccessViolationException.cs
- HijriCalendar.cs
- ConsoleEntryPoint.cs
- OpenTypeLayoutCache.cs
- SoundPlayer.cs
- EditorPartChrome.cs
- HierarchicalDataBoundControl.cs
- DbSourceParameterCollection.cs
- ComboBox.cs
- Line.cs
- Graphics.cs
- AttributeEmitter.cs
- BrowserCapabilitiesCompiler.cs
- KeyFrames.cs
- CustomError.cs
- WSHttpTransportSecurityElement.cs
- RecognizeCompletedEventArgs.cs
- ExtendedProtectionPolicyElement.cs
- ElementProxy.cs
- HtmlAnchor.cs
- TrackingMemoryStream.cs
- DurationConverter.cs
- AnnotationResourceCollection.cs
- recordstatefactory.cs
- ScriptControlManager.cs
- XAMLParseException.cs
- DelayedRegex.cs
- Model3D.cs
- TableAutomationPeer.cs
- KnownBoxes.cs
- WindowsBrush.cs
- DataError.cs
- ThrowHelper.cs
- PaginationProgressEventArgs.cs
- TextBreakpoint.cs
- ResizeGrip.cs
- WorkflowLayouts.cs
- SeekStoryboard.cs
- CallContext.cs
- FixedSOMFixedBlock.cs
- HtmlDocument.cs
- ChameleonKey.cs
- BasicDesignerLoader.cs