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
- SslStream.cs
- SmiXetterAccessMap.cs
- ButtonBaseDesigner.cs
- QilLoop.cs
- EndOfStreamException.cs
- ScrollProviderWrapper.cs
- Color.cs
- TraceHandler.cs
- CroppedBitmap.cs
- FixedSOMTableCell.cs
- DecimalAnimation.cs
- HtmlEmptyTagControlBuilder.cs
- IisTraceWebEventProvider.cs
- Closure.cs
- BitmapCodecInfo.cs
- WebPartDisplayMode.cs
- ToolTipAutomationPeer.cs
- ThaiBuddhistCalendar.cs
- AssemblyAssociatedContentFileAttribute.cs
- WebServiceData.cs
- CustomBinding.cs
- InvalidPropValue.cs
- PropertyReferenceSerializer.cs
- CompilerWrapper.cs
- XmlDomTextWriter.cs
- Processor.cs
- LexicalChunk.cs
- QualificationDataItem.cs
- InternalSendMessage.cs
- CurrentChangingEventArgs.cs
- DataControlFieldCell.cs
- InternalConfigSettingsFactory.cs
- PropertyInformationCollection.cs
- WeakEventTable.cs
- typedescriptorpermission.cs
- RowCache.cs
- ScaleTransform.cs
- ConfigurationValue.cs
- TableColumnCollection.cs
- DataColumnMapping.cs
- Properties.cs
- x509utils.cs
- WebException.cs
- XmlSchemaNotation.cs
- ControlType.cs
- Utils.cs
- GridViewSortEventArgs.cs
- StateElementCollection.cs
- DragEventArgs.cs
- LongValidatorAttribute.cs
- TextElementCollectionHelper.cs
- PagePropertiesChangingEventArgs.cs
- RetrieveVirtualItemEventArgs.cs
- SQLByte.cs
- Request.cs
- TypeNameHelper.cs
- Line.cs
- XPathBuilder.cs
- AuditLog.cs
- BooleanStorage.cs
- PriorityBinding.cs
- SafeUserTokenHandle.cs
- ThemeableAttribute.cs
- ObjectReaderCompiler.cs
- CodeAttachEventStatement.cs
- ListViewEditEventArgs.cs
- HttpApplication.cs
- Debugger.cs
- DataBindingCollectionConverter.cs
- ImplicitInputBrush.cs
- TableLayoutRowStyleCollection.cs
- ResolveCriteria.cs
- BamlRecords.cs
- UIElement3DAutomationPeer.cs
- EdmPropertyAttribute.cs
- HttpCapabilitiesSectionHandler.cs
- SystemUnicastIPAddressInformation.cs
- ScrollChrome.cs
- validation.cs
- Config.cs
- PackageProperties.cs
- QilStrConcat.cs
- PagesChangedEventArgs.cs
- CellPartitioner.cs
- CollectionConverter.cs
- MetadataArtifactLoaderCompositeResource.cs
- XmlCharCheckingReader.cs
- BamlResourceContent.cs
- EditorZone.cs
- StackSpiller.cs
- MetadataCache.cs
- ToolboxBitmapAttribute.cs
- CodeIterationStatement.cs
- FormatStringEditor.cs
- SafeTokenHandle.cs
- TextBox.cs
- DesignerTransactionCloseEvent.cs
- JavaScriptSerializer.cs
- LinkedResource.cs
- PasswordDeriveBytes.cs