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
- ParsedAttributeCollection.cs
- SecureEnvironment.cs
- sqlser.cs
- ReadOnlyHierarchicalDataSourceView.cs
- TemplateInstanceAttribute.cs
- ChildTable.cs
- TreeWalker.cs
- InternalConfigSettingsFactory.cs
- DetailsViewPageEventArgs.cs
- ValidatorCompatibilityHelper.cs
- LostFocusEventManager.cs
- QueryResults.cs
- DataTableClearEvent.cs
- WebPartConnectVerb.cs
- TypeUtil.cs
- CuspData.cs
- GetReadStreamResult.cs
- IisNotInstalledException.cs
- NavigateEvent.cs
- ArgIterator.cs
- PagePropertiesChangingEventArgs.cs
- MSAAWinEventWrap.cs
- FontSource.cs
- SqlWorkflowInstanceStore.cs
- ApplicationFileParser.cs
- BitmapEffectCollection.cs
- GeneralTransformCollection.cs
- CancellationTokenSource.cs
- ControlOperationBehavior.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- CustomSignedXml.cs
- ElementHostAutomationPeer.cs
- UIElement3DAutomationPeer.cs
- SizeAnimation.cs
- PriorityQueue.cs
- Run.cs
- InstancePersistenceEvent.cs
- RsaElement.cs
- DataGridViewRowCancelEventArgs.cs
- TimeoutException.cs
- IncomingWebRequestContext.cs
- EpmTargetPathSegment.cs
- WindowsGraphics2.cs
- SignedXml.cs
- ConnectionStringSettings.cs
- QuaternionIndependentAnimationStorage.cs
- XmlAttribute.cs
- WSMessageEncoding.cs
- StateDesignerConnector.cs
- ThemeDictionaryExtension.cs
- DataTableMapping.cs
- ReachNamespaceInfo.cs
- UIElement.cs
- MenuAdapter.cs
- AuthenticationServiceManager.cs
- StringDictionary.cs
- DataGridRowEventArgs.cs
- GeometryCombineModeValidation.cs
- Attachment.cs
- EntryIndex.cs
- EmissiveMaterial.cs
- XmlWrappingReader.cs
- EventHandlers.cs
- Math.cs
- XpsFixedDocumentReaderWriter.cs
- RadioButtonStandardAdapter.cs
- AsyncDataRequest.cs
- BaseUriHelper.cs
- SqlDuplicator.cs
- ForwardPositionQuery.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- QuerySettings.cs
- ToolTip.cs
- ClientBuildManagerCallback.cs
- WebPartEditVerb.cs
- FlagsAttribute.cs
- BaseParagraph.cs
- TextParagraph.cs
- SectionXmlInfo.cs
- RedirectionProxy.cs
- RecognizedAudio.cs
- HandlerWithFactory.cs
- HttpTransportElement.cs
- MailHeaderInfo.cs
- OdbcConnection.cs
- IsolatedStorageFile.cs
- OdbcDataAdapter.cs
- SoapRpcMethodAttribute.cs
- ListenerAdapter.cs
- RadioButtonPopupAdapter.cs
- BindingManagerDataErrorEventArgs.cs
- MetadataExchangeBindings.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- XmlSchemaSubstitutionGroup.cs
- DetailsViewInsertEventArgs.cs
- ResourceReader.cs
- SymLanguageType.cs
- SearchExpression.cs
- ListItemParagraph.cs
- FormsAuthenticationCredentials.cs