Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ImageListUtils.cs
- RoutedEventArgs.cs
- CompatibleComparer.cs
- HttpResponse.cs
- AttributeCollection.cs
- WebPartDeleteVerb.cs
- nulltextcontainer.cs
- SchemaImporterExtensionElement.cs
- HtmlValidationSummaryAdapter.cs
- RuntimeConfig.cs
- MenuAdapter.cs
- MetadataItem_Static.cs
- SafeMILHandleMemoryPressure.cs
- MessageBox.cs
- WasHostedComPlusFactory.cs
- LinkDescriptor.cs
- ColorPalette.cs
- MailMessage.cs
- StylesEditorDialog.cs
- Misc.cs
- EntityTransaction.cs
- ArgumentDesigner.xaml.cs
- IsolatedStoragePermission.cs
- IndentedWriter.cs
- XmlSchemaImporter.cs
- XPathScanner.cs
- XmlDocument.cs
- RemoteDebugger.cs
- DbMetaDataColumnNames.cs
- DialogResultConverter.cs
- COM2ExtendedUITypeEditor.cs
- ComponentSerializationService.cs
- MembershipValidatePasswordEventArgs.cs
- MenuCommand.cs
- XmlSortKeyAccumulator.cs
- PersonalizationState.cs
- UrlPath.cs
- PageParser.cs
- DefaultShape.cs
- JsonReader.cs
- DeclaredTypeElementCollection.cs
- PersistenceTypeAttribute.cs
- RSAPKCS1KeyExchangeFormatter.cs
- PrivilegedConfigurationManager.cs
- Decoder.cs
- ToolStrip.cs
- StateMachineWorkflow.cs
- sqlmetadatafactory.cs
- EntityDataReader.cs
- SourceSwitch.cs
- GroupItemAutomationPeer.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SchemaTableOptionalColumn.cs
- DataSourceSelectArguments.cs
- TextEditorContextMenu.cs
- SqlBooleanizer.cs
- Parsers.cs
- SwitchAttribute.cs
- HitTestParameters3D.cs
- SoapAttributes.cs
- IisTraceWebEventProvider.cs
- FileDialog_Vista_Interop.cs
- Metadata.cs
- COM2PropertyDescriptor.cs
- LineServices.cs
- PageContent.cs
- SafeRightsManagementSessionHandle.cs
- SqlParameterCollection.cs
- X509Utils.cs
- PreservationFileWriter.cs
- SelectionItemPatternIdentifiers.cs
- LongValidatorAttribute.cs
- LicenseException.cs
- GetCardDetailsRequest.cs
- SqlMethodTransformer.cs
- EntityDataSourceWrapper.cs
- TypeSemantics.cs
- MappingSource.cs
- SqlClientWrapperSmiStreamChars.cs
- ReverseComparer.cs
- EllipseGeometry.cs
- CursorConverter.cs
- ModuleBuilder.cs
- OptimisticConcurrencyException.cs
- TemplateControlParser.cs
- ConfigXmlElement.cs
- RemotingConfigParser.cs
- Constraint.cs
- PeerResolverMode.cs
- MetadataCollection.cs
- GACIdentityPermission.cs
- KeyConstraint.cs
- CompilerGlobalScopeAttribute.cs
- TrackingSection.cs
- LassoSelectionBehavior.cs
- BuildProviderAppliesToAttribute.cs
- ZipIOCentralDirectoryBlock.cs
- LinqDataSourceUpdateEventArgs.cs
- TraversalRequest.cs
- DelegateHelpers.Generated.cs