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
- AssemblyNameProxy.cs
- CompositeCollectionView.cs
- SectionVisual.cs
- WebSysDefaultValueAttribute.cs
- XmlSchemaValidationException.cs
- DCSafeHandle.cs
- GradientStop.cs
- XmlAtomicValue.cs
- XamlPathDataSerializer.cs
- LineVisual.cs
- CodePageUtils.cs
- OdbcConnectionString.cs
- ModuleElement.cs
- LocatorManager.cs
- NullExtension.cs
- InvalidComObjectException.cs
- EntityDataSourceValidationException.cs
- coordinatorscratchpad.cs
- HttpCapabilitiesSectionHandler.cs
- _LocalDataStore.cs
- XmlIterators.cs
- ConstrainedDataObject.cs
- QueryParameter.cs
- DataView.cs
- QuaternionRotation3D.cs
- InputEventArgs.cs
- RangeExpression.cs
- Listbox.cs
- OdbcConnectionString.cs
- DbMetaDataFactory.cs
- ComponentManagerBroker.cs
- RegisteredExpandoAttribute.cs
- ToolStripScrollButton.cs
- ProgressBarHighlightConverter.cs
- FilteredXmlReader.cs
- DrawingAttributesDefaultValueFactory.cs
- GeneratedView.cs
- EntityContainerAssociationSet.cs
- DataServiceStreamResponse.cs
- StrongNamePublicKeyBlob.cs
- Processor.cs
- DurableInstancingOptions.cs
- MimeTextImporter.cs
- DropTarget.cs
- InputLanguage.cs
- HtmlInputHidden.cs
- CompilerGeneratedAttribute.cs
- SystemIPInterfaceProperties.cs
- BindingExpressionBase.cs
- ScrollProperties.cs
- MemberExpression.cs
- LambdaCompiler.Address.cs
- DesignerProperties.cs
- ExpressionNormalizer.cs
- BitHelper.cs
- FrugalMap.cs
- TileBrush.cs
- RecordManager.cs
- DateTimeOffsetStorage.cs
- TargetConverter.cs
- EditingCoordinator.cs
- filewebrequest.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- CalendarAutoFormatDialog.cs
- CodeVariableReferenceExpression.cs
- EtwTrace.cs
- TagPrefixCollection.cs
- SizeChangedInfo.cs
- FormViewUpdateEventArgs.cs
- XmlWriterTraceListener.cs
- UserThread.cs
- WasAdminWrapper.cs
- SoapTypeAttribute.cs
- Error.cs
- filewebrequest.cs
- EventWaitHandle.cs
- StateFinalizationActivity.cs
- CodeTypeMember.cs
- XsltContext.cs
- Light.cs
- BinaryEditor.cs
- BamlLocalizableResourceKey.cs
- TextServicesLoader.cs
- XsltLoader.cs
- MemberMaps.cs
- SvcMapFileSerializer.cs
- WebPartTransformerAttribute.cs
- FormViewInsertEventArgs.cs
- SHA1Managed.cs
- DetailsViewPagerRow.cs
- securitycriticaldataformultiplegetandset.cs
- ThumbAutomationPeer.cs
- CodeSubDirectoriesCollection.cs
- Timer.cs
- SecurityTokenAuthenticator.cs
- Quad.cs
- Variable.cs
- MinimizableAttributeTypeConverter.cs
- CroppedBitmap.cs
- ConnectionManagementSection.cs