Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / RootBuilder.cs / 2 / RootBuilder.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Implements the root builder * * Copyright (c) 1998 Microsoft Corporation */ namespace System.Web.UI { using System.Runtime.InteropServices; using System; using System.Collections; using System.IO; using System.Reflection; using System.Web; using System.Web.Util; using System.Security.Permissions; ////// /// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class RootBuilder : TemplateBuilder { private MainTagNameToTypeMapper _typeMapper; // Contains a mapping of all objects to their associated builders private IDictionary _builtObjects; public RootBuilder() { } ///[To be supplied.] ////// public RootBuilder(TemplateParser parser) { } public IDictionary BuiltObjects { get { // Store any objects created by this control builder // so we can properly persist items if (_builtObjects == null) { _builtObjects = new Hashtable(ReferenceKeyComparer.Default); } return _builtObjects; } } internal void SetTypeMapper(MainTagNameToTypeMapper typeMapper) { _typeMapper = typeMapper; } ///[To be supplied.] ////// public override Type GetChildControlType(string tagName, IDictionary attribs) { // Is there a type to handle this control Type type = _typeMapper.GetControlType(tagName, attribs, true /*fAllowHtmlTags*/); return type; } internal override void PrepareNoCompilePageSupport() { base.PrepareNoCompilePageSupport(); // This is needed to break any connection with the TemplateParser, allowing it // to be fully collected when the parsing is complete _typeMapper = null; } private class ReferenceKeyComparer : IComparer, IEqualityComparer { internal static readonly ReferenceKeyComparer Default = new ReferenceKeyComparer(); bool IEqualityComparer.Equals(object x, object y) { return Object.ReferenceEquals(x, y); } int IEqualityComparer.GetHashCode(object obj) { return obj.GetHashCode(); } int IComparer.Compare(object x, object y) { if (Object.ReferenceEquals(x, y)) { return 0; } if (x == null) { return -1; } if (y == null) { return 1; } return 1; } } } }[To be supplied.] ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MaterialGroup.cs
- Label.cs
- MulticastIPAddressInformationCollection.cs
- TraceContextEventArgs.cs
- TextShapeableCharacters.cs
- ToolStripSettings.cs
- TerminatorSinks.cs
- PerfCounterSection.cs
- TransactedBatchContext.cs
- Transform3DGroup.cs
- InternalCache.cs
- MessageSmuggler.cs
- CornerRadiusConverter.cs
- XPathDocumentIterator.cs
- CodeChecksumPragma.cs
- ToolStripPanelRenderEventArgs.cs
- UnaryNode.cs
- EncoderExceptionFallback.cs
- Vector.cs
- NullableFloatSumAggregationOperator.cs
- CalendarDay.cs
- EasingKeyFrames.cs
- ScriptResourceAttribute.cs
- WebPartEventArgs.cs
- CodeDirectiveCollection.cs
- DataSet.cs
- FixedBufferAttribute.cs
- X509LogoTypeExtension.cs
- ByeMessageApril2005.cs
- DependencyPropertyDescriptor.cs
- MaskInputRejectedEventArgs.cs
- OleDbCommand.cs
- JavaScriptString.cs
- SapiGrammar.cs
- PersonalizableAttribute.cs
- ModuleBuilder.cs
- ThemeConfigurationDialog.cs
- StorageMappingFragment.cs
- ListViewItemMouseHoverEvent.cs
- DesignerActionVerbItem.cs
- EncoderFallback.cs
- MSHTMLHost.cs
- CompilationLock.cs
- XmlMapping.cs
- ExpressionBuilder.cs
- HttpProcessUtility.cs
- UnsafeNativeMethodsCLR.cs
- Funcletizer.cs
- PreloadHost.cs
- SevenBitStream.cs
- BaseCAMarshaler.cs
- ToolStripSettings.cs
- CapabilitiesUse.cs
- PerformanceCountersElement.cs
- ImageBrush.cs
- BuildManagerHost.cs
- XmlUtil.cs
- SystemSounds.cs
- BuildProviderUtils.cs
- JsonServiceDocumentSerializer.cs
- XmlQueryCardinality.cs
- ExtractCollection.cs
- WindowsListView.cs
- RoleManagerSection.cs
- ArrayList.cs
- XmlSerializerNamespaces.cs
- BuiltInExpr.cs
- SafePointer.cs
- OpCopier.cs
- WmiEventSink.cs
- PrintingPermission.cs
- WindowCollection.cs
- SimpleBitVector32.cs
- grammarelement.cs
- MonikerHelper.cs
- XmlDigitalSignatureProcessor.cs
- PlacementWorkspace.cs
- AppSecurityManager.cs
- TemplatedWizardStep.cs
- LocatorBase.cs
- FaultPropagationRecord.cs
- Clock.cs
- ResourcesBuildProvider.cs
- SessionEndedEventArgs.cs
- ExtensionQuery.cs
- TimeSpanMinutesConverter.cs
- TreeViewImageKeyConverter.cs
- SafeCloseHandleCritical.cs
- _SecureChannel.cs
- RoleManagerEventArgs.cs
- PngBitmapDecoder.cs
- CngAlgorithm.cs
- GifBitmapEncoder.cs
- FixedDocumentPaginator.cs
- RtfControlWordInfo.cs
- HttpFileCollection.cs
- Hyperlink.cs
- UriParserTemplates.cs
- figurelength.cs
- DefaultValueAttribute.cs