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
- Path.cs
- SpotLight.cs
- StringExpressionSet.cs
- AnonymousIdentificationSection.cs
- UInt32Converter.cs
- MessageContractAttribute.cs
- EntityDataSourceWizardForm.cs
- InnerItemCollectionView.cs
- WebPartZoneCollection.cs
- Thread.cs
- ToolStripSettings.cs
- AsymmetricSignatureDeformatter.cs
- AncestorChangedEventArgs.cs
- HtmlControl.cs
- BinaryReader.cs
- Stopwatch.cs
- ItemChangedEventArgs.cs
- RulePatternOps.cs
- SerialPinChanges.cs
- InProcStateClientManager.cs
- DetailsViewModeEventArgs.cs
- Zone.cs
- ClickablePoint.cs
- IFlowDocumentViewer.cs
- XmlSchemaComplexType.cs
- ShaperBuffers.cs
- RelAssertionDirectKeyIdentifierClause.cs
- _TLSstream.cs
- RunClient.cs
- ViewRendering.cs
- FragmentQuery.cs
- DBNull.cs
- APCustomTypeDescriptor.cs
- DesignTimeParseData.cs
- filewebresponse.cs
- XmlSchemaSimpleContent.cs
- ArrayExtension.cs
- PageThemeCodeDomTreeGenerator.cs
- DoubleCollectionValueSerializer.cs
- HttpCachePolicyElement.cs
- UnsafeNativeMethods.cs
- Storyboard.cs
- UInt16.cs
- IsolatedStoragePermission.cs
- GraphicsContainer.cs
- ManagedWndProcTracker.cs
- ControlDesignerState.cs
- DebuggerAttributes.cs
- TokenBasedSetEnumerator.cs
- TimeoutHelper.cs
- QuadraticBezierSegment.cs
- RNGCryptoServiceProvider.cs
- ExpandoClass.cs
- XPathSingletonIterator.cs
- RevocationPoint.cs
- SqlConnectionPoolGroupProviderInfo.cs
- NGCPageContentSerializerAsync.cs
- DesignerSerializationManager.cs
- UseManagedPresentationElement.cs
- XmlDomTextWriter.cs
- Part.cs
- CodeDirectoryCompiler.cs
- TextLineBreak.cs
- TdsParserSafeHandles.cs
- ContextProperty.cs
- TextEditorCharacters.cs
- DeadCharTextComposition.cs
- AppModelKnownContentFactory.cs
- webbrowsersite.cs
- SqlAliasesReferenced.cs
- SimpleTextLine.cs
- PhysicalAddress.cs
- SchemaNames.cs
- xmlglyphRunInfo.cs
- ObjectFullSpanRewriter.cs
- SystemWebExtensionsSectionGroup.cs
- OdbcCommandBuilder.cs
- XdrBuilder.cs
- ISAPIApplicationHost.cs
- PageSetupDialog.cs
- EntryPointNotFoundException.cs
- SelectionEditor.cs
- X509ServiceCertificateAuthentication.cs
- HostingPreferredMapPath.cs
- Int32.cs
- AsyncResult.cs
- XmlDomTextWriter.cs
- MaterialCollection.cs
- FontUnitConverter.cs
- SmiMetaData.cs
- Span.cs
- ListSortDescription.cs
- Part.cs
- FormatException.cs
- SystemTcpConnection.cs
- InvalidWMPVersionException.cs
- SrgsNameValueTag.cs
- PixelShader.cs
- DataGridViewRowsAddedEventArgs.cs
- errorpatternmatcher.cs