Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / EdmItemCollection.OcAssemblyCache.cs / 1305376 / EdmItemCollection.OcAssemblyCache.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Reflection; namespace System.Data.Metadata.Edm { internal class OcAssemblyCache { ////// cache for loaded assembly /// private Dictionary_conventionalOcCache; internal OcAssemblyCache() { _conventionalOcCache = new Dictionary (); } /// /// Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock, /// this method doesn't provide any locking mechanism. /// /// /// ///internal bool TryGetConventionalOcCacheFromAssemblyCache(Assembly assemblyToLookup, out ImmutableAssemblyCacheEntry cacheEntry) { cacheEntry = null; return _conventionalOcCache.TryGetValue(assemblyToLookup, out cacheEntry); } /// /// Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock, /// this method doesn't provide any locking mechanism. /// /// /// internal void AddAssemblyToOcCacheFromAssemblyCache(Assembly assembly, ImmutableAssemblyCacheEntry cacheEntry) { if (_conventionalOcCache.ContainsKey(assembly)) { // we shouldn't update the cache if we already have one return; } _conventionalOcCache.Add(assembly, cacheEntry); } } } // 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; namespace System.Data.Metadata.Edm { internal class OcAssemblyCache { ////// cache for loaded assembly /// private Dictionary_conventionalOcCache; internal OcAssemblyCache() { _conventionalOcCache = new Dictionary (); } /// /// Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock, /// this method doesn't provide any locking mechanism. /// /// /// ///internal bool TryGetConventionalOcCacheFromAssemblyCache(Assembly assemblyToLookup, out ImmutableAssemblyCacheEntry cacheEntry) { cacheEntry = null; return _conventionalOcCache.TryGetValue(assemblyToLookup, out cacheEntry); } /// /// Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock, /// this method doesn't provide any locking mechanism. /// /// /// internal void AddAssemblyToOcCacheFromAssemblyCache(Assembly assembly, ImmutableAssemblyCacheEntry cacheEntry) { if (_conventionalOcCache.ContainsKey(assembly)) { // we shouldn't update the cache if we already have one return; } _conventionalOcCache.Add(assembly, cacheEntry); } } } // 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
- MissingMethodException.cs
- SoapExtensionStream.cs
- XpsFontSerializationService.cs
- CodeIdentifiers.cs
- FragmentQuery.cs
- DocumentSequence.cs
- BackgroundWorker.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SessionPageStatePersister.cs
- EventlogProvider.cs
- Conditional.cs
- XmlNullResolver.cs
- InputLanguageManager.cs
- ControlEvent.cs
- SelectionHighlightInfo.cs
- xsdvalidator.cs
- Base64Stream.cs
- EntityTransaction.cs
- SqlTypeSystemProvider.cs
- DBSchemaTable.cs
- ArgIterator.cs
- ParseChildrenAsPropertiesAttribute.cs
- StylusOverProperty.cs
- VirtualDirectoryMappingCollection.cs
- WebUtil.cs
- UseLicense.cs
- BamlLocalizationDictionary.cs
- MsmqTransportReceiveParameters.cs
- ClassDataContract.cs
- GridItemPattern.cs
- AmbientEnvironment.cs
- _DigestClient.cs
- FrameworkName.cs
- Debug.cs
- CodeCommentStatementCollection.cs
- datacache.cs
- TypedTableGenerator.cs
- InlineCollection.cs
- CustomBindingCollectionElement.cs
- Block.cs
- CopyOnWriteList.cs
- XappLauncher.cs
- ListenDesigner.cs
- XmlSchemaAny.cs
- CommandDevice.cs
- WmlValidationSummaryAdapter.cs
- PrintControllerWithStatusDialog.cs
- PropertiesTab.cs
- DynamicILGenerator.cs
- SoapReflectionImporter.cs
- IisTraceListener.cs
- NameTable.cs
- TextBoxBase.cs
- RadioButtonBaseAdapter.cs
- PageSetupDialog.cs
- LineSegment.cs
- ValidatorCollection.cs
- InputMethodStateChangeEventArgs.cs
- BamlWriter.cs
- TypeUnloadedException.cs
- Point3DAnimationUsingKeyFrames.cs
- ResourceManager.cs
- SQLByteStorage.cs
- SqlTypeConverter.cs
- OrCondition.cs
- GrowingArray.cs
- ReliableChannelBinder.cs
- ZipIOCentralDirectoryFileHeader.cs
- InternalTypeHelper.cs
- ListBoxAutomationPeer.cs
- TimeEnumHelper.cs
- UserControlAutomationPeer.cs
- StandardCommands.cs
- ServiceDiscoveryBehavior.cs
- CodeDomSerializationProvider.cs
- ColorConverter.cs
- GridLengthConverter.cs
- LineServicesRun.cs
- CreateUserErrorEventArgs.cs
- ServiceHostingEnvironment.cs
- ResXResourceSet.cs
- CodeStatementCollection.cs
- BinaryOperationBinder.cs
- SignatureDescription.cs
- InputMethodStateTypeInfo.cs
- RunWorkerCompletedEventArgs.cs
- RawUIStateInputReport.cs
- LZCodec.cs
- OperationInvokerBehavior.cs
- MSG.cs
- SqlFlattener.cs
- DateRangeEvent.cs
- OleDbEnumerator.cs
- OutputCacheModule.cs
- SigningDialog.cs
- HyperLinkStyle.cs
- SqlClientWrapperSmiStream.cs
- CodeGroup.cs
- ToolZone.cs
- DbDataSourceEnumerator.cs