Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / ObjectLayer / KnownAssemblyEntry.cs / 1305376 / KnownAssemblyEntry.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Reflection; using System.Diagnostics; namespace System.Data.Metadata.Edm { internal sealed class KnownAssemblyEntry { private readonly AssemblyCacheEntry _cacheEntry; private bool _referencedAssembliesAreLoaded; private bool _seenWithEdmItemCollection; internal KnownAssemblyEntry(AssemblyCacheEntry cacheEntry, bool seenWithEdmItemCollection) { Debug.Assert(cacheEntry != null, "Found a null cacheEntry"); _cacheEntry = cacheEntry; _referencedAssembliesAreLoaded = false; _seenWithEdmItemCollection = seenWithEdmItemCollection; } internal AssemblyCacheEntry CacheEntry { get { return _cacheEntry; } } public bool ReferencedAssembliesAreLoaded { get { return _referencedAssembliesAreLoaded; } set { _referencedAssembliesAreLoaded = value; } } public bool SeenWithEdmItemCollection { get { return _seenWithEdmItemCollection; } set { _seenWithEdmItemCollection = value; } } public bool HaveSeenInCompatibleContext(object loaderCookie, EdmItemCollection itemCollection) { // a new "context" is only when we have not seen this assembly with an itemCollection that is non-null // and we now have a non-null itemCollection, and we are not already in AttributeLoader mode. return SeenWithEdmItemCollection || itemCollection == null || ObjectItemAssemblyLoader.IsAttributeLoader(loaderCookie); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Reflection; using System.Diagnostics; namespace System.Data.Metadata.Edm { internal sealed class KnownAssemblyEntry { private readonly AssemblyCacheEntry _cacheEntry; private bool _referencedAssembliesAreLoaded; private bool _seenWithEdmItemCollection; internal KnownAssemblyEntry(AssemblyCacheEntry cacheEntry, bool seenWithEdmItemCollection) { Debug.Assert(cacheEntry != null, "Found a null cacheEntry"); _cacheEntry = cacheEntry; _referencedAssembliesAreLoaded = false; _seenWithEdmItemCollection = seenWithEdmItemCollection; } internal AssemblyCacheEntry CacheEntry { get { return _cacheEntry; } } public bool ReferencedAssembliesAreLoaded { get { return _referencedAssembliesAreLoaded; } set { _referencedAssembliesAreLoaded = value; } } public bool SeenWithEdmItemCollection { get { return _seenWithEdmItemCollection; } set { _seenWithEdmItemCollection = value; } } public bool HaveSeenInCompatibleContext(object loaderCookie, EdmItemCollection itemCollection) { // a new "context" is only when we have not seen this assembly with an itemCollection that is non-null // and we now have a non-null itemCollection, and we are not already in AttributeLoader mode. return SeenWithEdmItemCollection || itemCollection == null || ObjectItemAssemblyLoader.IsAttributeLoader(loaderCookie); } } } // 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
- Grammar.cs
- ProcessManager.cs
- InstanceDataCollectionCollection.cs
- GradientBrush.cs
- MatrixAnimationUsingPath.cs
- Camera.cs
- FormDocumentDesigner.cs
- DateTimeHelper.cs
- XNodeNavigator.cs
- ParserContext.cs
- XmlNullResolver.cs
- BitArray.cs
- PropertyOrder.cs
- Accessible.cs
- RegexCharClass.cs
- BitmapCodecInfo.cs
- compensatingcollection.cs
- WebScriptMetadataMessageEncoderFactory.cs
- ExtendedPropertyDescriptor.cs
- TextSpan.cs
- OleAutBinder.cs
- EntityDataSourceChangedEventArgs.cs
- InvalidPropValue.cs
- MostlySingletonList.cs
- ClientEventManager.cs
- ModuleConfigurationInfo.cs
- DataBindingValueUIHandler.cs
- CustomExpression.cs
- ObjectQuery_EntitySqlExtensions.cs
- LicenseContext.cs
- PropertyValueChangedEvent.cs
- EntityDesignerBuildProvider.cs
- EventLogEntryCollection.cs
- Int32Animation.cs
- OutOfProcStateClientManager.cs
- EdmPropertyAttribute.cs
- Error.cs
- MessageHeaderAttribute.cs
- TcpAppDomainProtocolHandler.cs
- AdditionalEntityFunctions.cs
- MimeParameterWriter.cs
- CustomMenuItemCollection.cs
- UnaryExpressionHelper.cs
- WriteableOnDemandStream.cs
- IODescriptionAttribute.cs
- CounterSetInstance.cs
- DBSqlParser.cs
- PasswordBoxAutomationPeer.cs
- ReadOnlyDataSourceView.cs
- BookmarkEventArgs.cs
- PeerToPeerException.cs
- SelectionRange.cs
- VSWCFServiceContractGenerator.cs
- XmlRawWriterWrapper.cs
- ListViewInsertionMark.cs
- HttpCookieCollection.cs
- DeflateStream.cs
- ColorInterpolationModeValidation.cs
- ThreadAttributes.cs
- HitTestDrawingContextWalker.cs
- GraphicsPath.cs
- EdmScalarPropertyAttribute.cs
- TreeBuilder.cs
- LocatorPart.cs
- ObjectIDGenerator.cs
- DataGridTextBoxColumn.cs
- WebServicesDescriptionAttribute.cs
- MultiDataTrigger.cs
- AncestorChangedEventArgs.cs
- Compiler.cs
- ForeignKeyConstraint.cs
- TaskFactory.cs
- RepeatInfo.cs
- SettingsProviderCollection.cs
- SmtpCommands.cs
- DomNameTable.cs
- XamlTreeBuilder.cs
- WebOperationContext.cs
- MultitargetUtil.cs
- XmlCharacterData.cs
- XmlSchemaObject.cs
- Thickness.cs
- DynamicDataExtensions.cs
- XmlCountingReader.cs
- EntityDataSourceStatementEditor.cs
- SimpleBitVector32.cs
- SettingsPropertyValueCollection.cs
- COM2ExtendedUITypeEditor.cs
- FocusWithinProperty.cs
- WebExceptionStatus.cs
- XmlEncodedRawTextWriter.cs
- Char.cs
- SizeAnimation.cs
- Stream.cs
- SecurityListenerSettingsLifetimeManager.cs
- WebZone.cs
- WorkflowOwnershipException.cs
- ConvertEvent.cs
- IISUnsafeMethods.cs
- FullTrustAssembliesSection.cs