Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / TagMapCollection.cs / 1305376 / TagMapCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; using System.Web.UI; using System.Web.Compilation; using System.Threading; using System.Web.Configuration; using System.Security.Permissions; [ConfigurationCollection(typeof(TagMapInfo))] public sealed class TagMapCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; private Hashtable _tagMappings; static TagMapCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } public TagMapCollection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public TagMapInfo this[int index] { get { return (TagMapInfo)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public void Add(TagMapInfo tagMapInformation) { BaseAdd(tagMapInformation); } public void Remove(TagMapInfo tagMapInformation) { BaseRemove(GetElementKey(tagMapInformation)); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new TagMapInfo(); } protected override Object GetElementKey(ConfigurationElement element) { return ((TagMapInfo)element).TagType; } internal Hashtable TagTypeMappingInternal { get { if (_tagMappings == null) { lock (this) { if (_tagMappings == null) { Hashtable tagMappings = new Hashtable(StringComparer.OrdinalIgnoreCase); foreach (TagMapInfo tmi in this) { Type tagType = ConfigUtil.GetType(tmi.TagType, "tagType", tmi); Type mappedTagType = ConfigUtil.GetType(tmi.MappedTagType, "mappedTagType", tmi); if (tagType.IsAssignableFrom(mappedTagType) == false) { throw new ConfigurationErrorsException( SR.GetString( SR.Mapped_type_must_inherit, tmi.MappedTagType, tmi.TagType), tmi.ElementInformation.Properties["mappedTagType"].Source, tmi.ElementInformation.Properties["mappedTagType"].LineNumber); } tagMappings[tagType] = mappedTagType; } _tagMappings = tagMappings; } } } return _tagMappings; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SiteMapSection.cs
- TaiwanCalendar.cs
- ObjectToken.cs
- TextReturnReader.cs
- ParallelEnumerable.cs
- SeekStoryboard.cs
- TimelineGroup.cs
- StrongTypingException.cs
- WindowsSecurityTokenAuthenticator.cs
- ChangeProcessor.cs
- FixedPageStructure.cs
- CultureTable.cs
- MimeXmlImporter.cs
- NameValueCollection.cs
- AuthenticatingEventArgs.cs
- XmlArrayItemAttributes.cs
- InternalConfigSettingsFactory.cs
- PrivilegedConfigurationManager.cs
- DateBoldEvent.cs
- RbTree.cs
- HttpContext.cs
- mediaclock.cs
- PassportAuthenticationEventArgs.cs
- XmlSchemaImporter.cs
- UriTemplateTrieLocation.cs
- SessionPageStatePersister.cs
- DateTimeConverter2.cs
- ColumnWidthChangingEvent.cs
- DataGridTemplateColumn.cs
- MessageDesigner.cs
- LineServices.cs
- ContainerUIElement3D.cs
- DependencyObjectPropertyDescriptor.cs
- IInstanceContextProvider.cs
- MobileContainerDesigner.cs
- FontStyleConverter.cs
- ICspAsymmetricAlgorithm.cs
- CodeDomSerializer.cs
- HandlerBase.cs
- EditorPartChrome.cs
- ScalarOps.cs
- AuthenticateEventArgs.cs
- ChannelServices.cs
- DiscoveryOperationContext.cs
- ServiceParser.cs
- ExpressionCopier.cs
- ValueTable.cs
- DateTimeUtil.cs
- WasHttpModulesInstallComponent.cs
- CharEnumerator.cs
- TypeGeneratedEventArgs.cs
- ListViewDataItem.cs
- CrossContextChannel.cs
- CacheOutputQuery.cs
- PersonalizationStateQuery.cs
- SystemIcmpV4Statistics.cs
- FrameworkTextComposition.cs
- StaticExtension.cs
- Timer.cs
- TcpSocketManager.cs
- ObjectDisposedException.cs
- SqlDependencyUtils.cs
- ResourceDescriptionAttribute.cs
- RecognizerInfo.cs
- DashStyles.cs
- Int16.cs
- Base64WriteStateInfo.cs
- StorageFunctionMapping.cs
- ConfigXmlComment.cs
- LayoutUtils.cs
- Dump.cs
- MethodBody.cs
- SqlCharStream.cs
- StrongNameMembershipCondition.cs
- TemplateXamlTreeBuilder.cs
- ImageMapEventArgs.cs
- FilterException.cs
- RawUIStateInputReport.cs
- ImageBrush.cs
- Maps.cs
- GeneralTransform3DTo2DTo3D.cs
- AssemblyCache.cs
- QueryStatement.cs
- ListViewGroup.cs
- FocusManager.cs
- StorageComplexTypeMapping.cs
- KnownBoxes.cs
- DetailsViewPageEventArgs.cs
- UiaCoreProviderApi.cs
- XmlTextAttribute.cs
- TreeViewImageIndexConverter.cs
- ContainerParagraph.cs
- _DigestClient.cs
- XamlTypeMapper.cs
- StickyNoteAnnotations.cs
- GridViewPageEventArgs.cs
- PassportAuthenticationModule.cs
- XsdDateTime.cs
- RemoteWebConfigurationHost.cs
- Quaternion.cs