Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Markup / KnownTypesHelper.cs / 1 / KnownTypesHelper.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // //--------------------------------------------------------------------------- using System; using System.IO; using System.Collections.Generic; using System.Reflection; using System.Diagnostics; // These are the non-generated parts of the KnownTypes and TypeIndexer classes #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal static partial class KnownTypes { // Keep Known WCP Types in a private array, accessed through an indexer private static TypeIndexer _typeIndexer = new TypeIndexer((int)KnownElements.MaxElement); internal static TypeIndexer Types { get { return _typeIndexer; } } #if PBTCOMPILER internal static void InitializeKnownTypes(Assembly asmFramework, Assembly asmCore, Assembly asmBase) { _typeIndexer.Initialize(asmFramework, asmCore, asmBase); } #endif } internal partial class TypeIndexer { public TypeIndexer(int size) { _typeTable =new Type[size]; } public System.Type this[int index] { get { Type t = _typeTable[index]; if (t == null) { t = InitializeOneType((KnownElements)index); } _typeTable[index] = t; return t; } } private Type[] _typeTable; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // //--------------------------------------------------------------------------- using System; using System.IO; using System.Collections.Generic; using System.Reflection; using System.Diagnostics; // These are the non-generated parts of the KnownTypes and TypeIndexer classes #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal static partial class KnownTypes { // Keep Known WCP Types in a private array, accessed through an indexer private static TypeIndexer _typeIndexer = new TypeIndexer((int)KnownElements.MaxElement); internal static TypeIndexer Types { get { return _typeIndexer; } } #if PBTCOMPILER internal static void InitializeKnownTypes(Assembly asmFramework, Assembly asmCore, Assembly asmBase) { _typeIndexer.Initialize(asmFramework, asmCore, asmBase); } #endif } internal partial class TypeIndexer { public TypeIndexer(int size) { _typeTable =new Type[size]; } public System.Type this[int index] { get { Type t = _typeTable[index]; if (t == null) { t = InitializeOneType((KnownElements)index); } _typeTable[index] = t; return t; } } private Type[] _typeTable; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEndOfSegment.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- BuildProviderCollection.cs
- ProtectedConfigurationSection.cs
- StringCollectionMarkupSerializer.cs
- RijndaelManagedTransform.cs
- PixelShader.cs
- MetabaseServerConfig.cs
- QueryOutputWriter.cs
- CustomError.cs
- MetadataArtifactLoaderResource.cs
- COM2ExtendedTypeConverter.cs
- NTAccount.cs
- DefaultBinder.cs
- StrokeCollection2.cs
- DataServiceBuildProvider.cs
- IItemContainerGenerator.cs
- PointLightBase.cs
- TextBoxAutoCompleteSourceConverter.cs
- WebPartEventArgs.cs
- XmlAttributes.cs
- PageBreakRecord.cs
- OleDbConnectionInternal.cs
- ZipArchive.cs
- WinEventHandler.cs
- PeerNameResolver.cs
- Drawing.cs
- MachineKeyConverter.cs
- WebPartExportVerb.cs
- CultureTable.cs
- XmlSchemaParticle.cs
- ListViewItem.cs
- CustomAttributeBuilder.cs
- CompressedStack.cs
- WeakReferenceList.cs
- DataAdapter.cs
- BlurEffect.cs
- RequestCachePolicyConverter.cs
- WindowsToolbarItemAsMenuItem.cs
- HMAC.cs
- GlobalProxySelection.cs
- RegexRunner.cs
- XmlCustomFormatter.cs
- User.cs
- PersonalizationEntry.cs
- LogEntry.cs
- LineMetrics.cs
- SqlCaseSimplifier.cs
- FixedSOMTableCell.cs
- DataControlLinkButton.cs
- TiffBitmapEncoder.cs
- RoutedEvent.cs
- PersonalizationStateInfo.cs
- CollectionContainer.cs
- Size.cs
- CalendarDay.cs
- FrugalMap.cs
- MemberRelationshipService.cs
- AssociationSetEnd.cs
- DockPatternIdentifiers.cs
- SynchronizationContext.cs
- RegexCode.cs
- DataGridItem.cs
- PrivilegedConfigurationManager.cs
- ConnectionManagementElement.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- SeverityFilter.cs
- NetworkStream.cs
- SchemaContext.cs
- UserPreferenceChangingEventArgs.cs
- SetStoryboardSpeedRatio.cs
- CacheEntry.cs
- EdmTypeAttribute.cs
- WorkflowControlClient.cs
- FlowLayout.cs
- UnsafeNativeMethods.cs
- IUnknownConstantAttribute.cs
- PageContent.cs
- ProfileParameter.cs
- ScriptHandlerFactory.cs
- AudioStateChangedEventArgs.cs
- FontFamilyConverter.cs
- WindowsImpersonationContext.cs
- documentsequencetextcontainer.cs
- LocatorBase.cs
- selecteditemcollection.cs
- UnsafePeerToPeerMethods.cs
- RoutedUICommand.cs
- Guid.cs
- CommonObjectSecurity.cs
- TimerElapsedEvenArgs.cs
- InvalidateEvent.cs
- WindowsStatusBar.cs
- FormViewPageEventArgs.cs
- TreeNodeStyleCollection.cs
- ScrollViewer.cs
- JournalEntry.cs
- ProfileSettingsCollection.cs
- SuppressMessageAttribute.cs
- ServiceManager.cs