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
- Point4D.cs
- GridItem.cs
- StickyNoteHelper.cs
- ToolStripHighContrastRenderer.cs
- ObjectViewFactory.cs
- GenericAuthenticationEventArgs.cs
- UserCancellationException.cs
- CompilerHelpers.cs
- TrackingProfileSerializer.cs
- TabItemWrapperAutomationPeer.cs
- CacheHelper.cs
- DefaultExpression.cs
- SyntaxCheck.cs
- ExtensibleClassFactory.cs
- WebZoneDesigner.cs
- X509AsymmetricSecurityKey.cs
- FeatureSupport.cs
- DataSourceControlBuilder.cs
- HMACSHA1.cs
- SourceFileInfo.cs
- DateTimeFormatInfoScanner.cs
- ChildTable.cs
- SatelliteContractVersionAttribute.cs
- ScriptingWebServicesSectionGroup.cs
- ControlPaint.cs
- BitmapEffectInput.cs
- DeadCharTextComposition.cs
- ListViewPagedDataSource.cs
- ServiceContractViewControl.Designer.cs
- StandardCommandToolStripMenuItem.cs
- FormatException.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- ConfigurationSettings.cs
- DataGridViewRowCollection.cs
- _SslState.cs
- ReturnValue.cs
- DecoderReplacementFallback.cs
- ConfigurationElement.cs
- ProtectedConfigurationSection.cs
- Model3D.cs
- DynamicILGenerator.cs
- TextPattern.cs
- GradientBrush.cs
- LogReserveAndAppendState.cs
- XhtmlConformanceSection.cs
- ReadOnlyCollectionBase.cs
- XmlIgnoreAttribute.cs
- Point.cs
- precedingsibling.cs
- PanelContainerDesigner.cs
- SoapReflectionImporter.cs
- WebBrowserBase.cs
- ListenerSessionConnectionReader.cs
- XmlText.cs
- LogicalExpr.cs
- AdapterDictionary.cs
- Vector3DConverter.cs
- DataRecord.cs
- EnumerationRangeValidationUtil.cs
- AssociationTypeEmitter.cs
- CurrentChangingEventArgs.cs
- RouteValueDictionary.cs
- SupportingTokenSpecification.cs
- CngUIPolicy.cs
- GeneratedContractType.cs
- StyleHelper.cs
- SelectionProcessor.cs
- XPathMultyIterator.cs
- UTF8Encoding.cs
- GridViewUpdateEventArgs.cs
- TypeConverterHelper.cs
- MexBindingBindingCollectionElement.cs
- IndentTextWriter.cs
- Int16Storage.cs
- InvokeSchedule.cs
- GridItemCollection.cs
- dtdvalidator.cs
- ResizingMessageFilter.cs
- XmlSchemaException.cs
- DocumentGrid.cs
- BamlTreeNode.cs
- ExceptionList.cs
- ConfigurationProviderException.cs
- formatstringdialog.cs
- StylusPlugin.cs
- BitmapEffectDrawingContextState.cs
- CollectionTypeElement.cs
- PassportPrincipal.cs
- CommandBinding.cs
- httpstaticobjectscollection.cs
- TextElement.cs
- WebPermission.cs
- ControlCommandSet.cs
- SoapDocumentMethodAttribute.cs
- controlskin.cs
- XmlAnyAttributeAttribute.cs
- TextServicesCompartmentContext.cs
- ViewgenGatekeeper.cs
- JournalEntryStack.cs
- LicenseProviderAttribute.cs