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
- DataColumnPropertyDescriptor.cs
- WebPartTransformerAttribute.cs
- CodeIdentifiers.cs
- FontDialog.cs
- UserNameSecurityToken.cs
- ListViewCancelEventArgs.cs
- DropShadowEffect.cs
- ScriptResourceAttribute.cs
- AppDomainAttributes.cs
- OdbcFactory.cs
- PermissionRequestEvidence.cs
- BitmapImage.cs
- ResourceManager.cs
- RoutedPropertyChangedEventArgs.cs
- FixedPageAutomationPeer.cs
- ObjectContext.cs
- WsatTransactionInfo.cs
- DesignColumn.cs
- ErasingStroke.cs
- GroupedContextMenuStrip.cs
- SizeValueSerializer.cs
- TypeUsageBuilder.cs
- columnmapfactory.cs
- ExpressionEditorAttribute.cs
- BigInt.cs
- SerializationAttributes.cs
- DocumentGridPage.cs
- sqlpipe.cs
- ConfigurationLockCollection.cs
- TraceLevelStore.cs
- Grant.cs
- HMACRIPEMD160.cs
- TraceContextEventArgs.cs
- Int32Storage.cs
- WebPartEditorCancelVerb.cs
- LinearGradientBrush.cs
- Object.cs
- DesignerAttribute.cs
- Win32NamedPipes.cs
- FileDialog_Vista.cs
- ListViewItem.cs
- AdPostCacheSubstitution.cs
- EmptyStringExpandableObjectConverter.cs
- UserPersonalizationStateInfo.cs
- IndependentlyAnimatedPropertyMetadata.cs
- EntityCollection.cs
- ModelPropertyCollectionImpl.cs
- ListViewGroupConverter.cs
- StreamInfo.cs
- CodeTypeReference.cs
- XsdDuration.cs
- webproxy.cs
- SystemException.cs
- HostedNamedPipeTransportManager.cs
- HwndHost.cs
- ResourceProviderFactory.cs
- FormViewPageEventArgs.cs
- SqlInternalConnectionSmi.cs
- PropertyTab.cs
- XsdCachingReader.cs
- XMLUtil.cs
- SqlParameterizer.cs
- XmlSubtreeReader.cs
- InheritedPropertyDescriptor.cs
- DefaultSettingsSection.cs
- RecognizedWordUnit.cs
- CodeArgumentReferenceExpression.cs
- XmlAttributeCache.cs
- XpsResource.cs
- WindowsTooltip.cs
- CodeAttributeArgumentCollection.cs
- SSmlParser.cs
- FtpWebRequest.cs
- DrawingServices.cs
- XomlCompilerParameters.cs
- PrintPreviewDialog.cs
- SafeThemeHandle.cs
- XmlObjectSerializerReadContext.cs
- Vector3DKeyFrameCollection.cs
- HandlerFactoryCache.cs
- DecimalAnimation.cs
- Latin1Encoding.cs
- Misc.cs
- ManagementClass.cs
- WindowsGraphics2.cs
- CanExecuteRoutedEventArgs.cs
- Helpers.cs
- TemplatingOptionsDialog.cs
- MembershipAdapter.cs
- ToolbarAUtomationPeer.cs
- RayHitTestParameters.cs
- PasswordRecoveryDesigner.cs
- NavigationFailedEventArgs.cs
- AliasExpr.cs
- CatalogZoneBase.cs
- selecteditemcollection.cs
- AppSecurityManager.cs
- Point3DCollectionConverter.cs
- SafeBitVector32.cs
- BigInt.cs