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
- HttpCacheParams.cs
- XmlSchemaSimpleType.cs
- TextClipboardData.cs
- ExtractorMetadata.cs
- PartialCachingControl.cs
- ContentTextAutomationPeer.cs
- Model3DGroup.cs
- EncodingInfo.cs
- BufferedResponseStream.cs
- PropertyRef.cs
- LocalClientSecuritySettings.cs
- AnnotationService.cs
- AssociatedControlConverter.cs
- SafeProcessHandle.cs
- TypeForwardedToAttribute.cs
- TabPanel.cs
- MemberRelationshipService.cs
- DoubleAnimationUsingPath.cs
- ListViewInsertionMark.cs
- NullEntityWrapper.cs
- StorageTypeMapping.cs
- SecurityTokenValidationException.cs
- HtmlElement.cs
- WebMethodAttribute.cs
- WasAdminWrapper.cs
- ServiceXNameTypeConverter.cs
- Blend.cs
- VectorKeyFrameCollection.cs
- DesignerSerializationOptionsAttribute.cs
- EmbeddedMailObject.cs
- XmlDocumentFragment.cs
- TypeDelegator.cs
- CommentEmitter.cs
- MarkerProperties.cs
- ComplexPropertyEntry.cs
- Attributes.cs
- ConfigurationManagerHelperFactory.cs
- HostingEnvironmentException.cs
- ProfileSettings.cs
- ArrayMergeHelper.cs
- AnnotationStore.cs
- PolicyManager.cs
- LookupBindingPropertiesAttribute.cs
- HtmlInputButton.cs
- PopupEventArgs.cs
- PrintSchema.cs
- KeyEventArgs.cs
- basevalidator.cs
- DuplicateWaitObjectException.cs
- ContextBase.cs
- PersonalizableTypeEntry.cs
- BasicHttpBindingCollectionElement.cs
- Stack.cs
- DataErrorValidationRule.cs
- RemotingSurrogateSelector.cs
- DataPagerCommandEventArgs.cs
- BinHexDecoder.cs
- SemaphoreFullException.cs
- InboundActivityHelper.cs
- DesignerEventService.cs
- DSACryptoServiceProvider.cs
- SerializerWriterEventHandlers.cs
- OleDbRowUpdatingEvent.cs
- DataGridViewCheckBoxColumn.cs
- ConfigurationManager.cs
- ValueUtilsSmi.cs
- EmbossBitmapEffect.cs
- DefaultBindingPropertyAttribute.cs
- Msec.cs
- TransactionChannelListener.cs
- ObjectListDataBindEventArgs.cs
- Sequence.cs
- printdlgexmarshaler.cs
- DoubleAnimationClockResource.cs
- CommandConverter.cs
- HMACMD5.cs
- ParseChildrenAsPropertiesAttribute.cs
- EventListener.cs
- AttachInfo.cs
- BindingGroup.cs
- ProfileSettingsCollection.cs
- ParamArrayAttribute.cs
- DiscoveryReferences.cs
- OrderedHashRepartitionEnumerator.cs
- TableStyle.cs
- SaveFileDialogDesigner.cs
- Point3D.cs
- TraceContextRecord.cs
- XsdDateTime.cs
- DictionaryGlobals.cs
- XmlSchemaAppInfo.cs
- HostedTransportConfigurationManager.cs
- DataServiceQueryException.cs
- Not.cs
- CommandSet.cs
- AppDomainManager.cs
- GroupDescription.cs
- Rect.cs
- Asn1IntegerConverter.cs
- FileUtil.cs