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
- WebRequestModuleElement.cs
- RequestCacheValidator.cs
- DataPagerFieldItem.cs
- RegexCharClass.cs
- Random.cs
- Point3DAnimationBase.cs
- ListViewTableCell.cs
- ConfigurationElement.cs
- KeyFrames.cs
- WebPartEditorOkVerb.cs
- QueryableDataSourceHelper.cs
- EnvelopedPkcs7.cs
- COM2IDispatchConverter.cs
- SizeConverter.cs
- HtmlHead.cs
- FilteredReadOnlyMetadataCollection.cs
- WebPageTraceListener.cs
- ThemeableAttribute.cs
- SharedUtils.cs
- TraceSource.cs
- InputScopeAttribute.cs
- AutomationInteropProvider.cs
- RecognitionResult.cs
- WindowsToolbarAsMenu.cs
- PropertyBuilder.cs
- TextEditorTables.cs
- OdbcEnvironmentHandle.cs
- WindowsListViewItemCheckBox.cs
- OleDbConnectionInternal.cs
- TemplateEditingFrame.cs
- codemethodreferenceexpression.cs
- HashMembershipCondition.cs
- StateDesignerConnector.cs
- Enlistment.cs
- XmlNodeWriter.cs
- ObjectDataSourceWizardForm.cs
- Int16.cs
- SafeNativeMethodsMilCoreApi.cs
- MimeWriter.cs
- DataPagerField.cs
- UserControlCodeDomTreeGenerator.cs
- X509CertificateEndpointIdentity.cs
- OracleBinary.cs
- KeyTime.cs
- ContextQuery.cs
- TextServicesCompartmentEventSink.cs
- SizeValueSerializer.cs
- MetafileHeaderWmf.cs
- ReadOnlyCollectionBase.cs
- Link.cs
- TdsValueSetter.cs
- GridViewColumnCollectionChangedEventArgs.cs
- XPathBinder.cs
- HiddenFieldPageStatePersister.cs
- XmlILIndex.cs
- MessageQueue.cs
- DbConnectionFactory.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- WebException.cs
- HttpCapabilitiesBase.cs
- PackagePart.cs
- BrowserTree.cs
- GridViewPageEventArgs.cs
- Thread.cs
- TextTreeRootTextBlock.cs
- ContextMarshalException.cs
- FontDriver.cs
- JapaneseCalendar.cs
- CodeSnippetTypeMember.cs
- TransactionsSectionGroup.cs
- TypeListConverter.cs
- Comparer.cs
- ServiceNotStartedException.cs
- Point3DAnimationUsingKeyFrames.cs
- ProviderMetadata.cs
- SafeRightsManagementQueryHandle.cs
- DataGridViewUtilities.cs
- DataGridViewCellParsingEventArgs.cs
- ToolStripSystemRenderer.cs
- Completion.cs
- CharUnicodeInfo.cs
- EncoderNLS.cs
- Vertex.cs
- SystemIPGlobalProperties.cs
- DescendentsWalker.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- StringFreezingAttribute.cs
- CharUnicodeInfo.cs
- smtpconnection.cs
- UIElementPropertyUndoUnit.cs
- HttpDictionary.cs
- XhtmlTextWriter.cs
- RowVisual.cs
- BinaryFormatter.cs
- RootBrowserWindow.cs
- FormsAuthenticationModule.cs
- FakeModelPropertyImpl.cs
- __Error.cs
- QilDataSource.cs
- Point3DAnimationUsingKeyFrames.cs