Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / TagPrefixCollection.cs / 5 / TagPrefixCollection.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(TagPrefixInfo), AddItemName = "add", CollectionType = ConfigurationElementCollectionType.BasicMap)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class TagPrefixCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static TagPrefixCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } public TagPrefixCollection() : base(StringComparer.OrdinalIgnoreCase) { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public TagPrefixInfo this[int index] { get { return (TagPrefixInfo)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public override ConfigurationElementCollectionType CollectionType { get { return ConfigurationElementCollectionType.BasicMap; } } protected override bool ThrowOnDuplicate { get { return true; } } public void Add(TagPrefixInfo tagPrefixInformation) { BaseAdd(tagPrefixInformation); } public void Remove(TagPrefixInfo tagPrefixInformation) { BaseRemove(GetElementKey(tagPrefixInformation)); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new TagPrefixInfo(); } protected override string ElementName { get { return "add"; } } protected override Object GetElementKey(ConfigurationElement element) { TagPrefixInfo info = (TagPrefixInfo)element; if (String.IsNullOrEmpty(info.TagName)) { return info.TagPrefix + ":" + info.Namespace + ":" + (String.IsNullOrEmpty(info.Assembly) ? string.Empty : info.Assembly); } else { return info.TagPrefix + ":" + info.TagName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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(TagPrefixInfo), AddItemName = "add", CollectionType = ConfigurationElementCollectionType.BasicMap)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class TagPrefixCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static TagPrefixCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } public TagPrefixCollection() : base(StringComparer.OrdinalIgnoreCase) { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public TagPrefixInfo this[int index] { get { return (TagPrefixInfo)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public override ConfigurationElementCollectionType CollectionType { get { return ConfigurationElementCollectionType.BasicMap; } } protected override bool ThrowOnDuplicate { get { return true; } } public void Add(TagPrefixInfo tagPrefixInformation) { BaseAdd(tagPrefixInformation); } public void Remove(TagPrefixInfo tagPrefixInformation) { BaseRemove(GetElementKey(tagPrefixInformation)); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new TagPrefixInfo(); } protected override string ElementName { get { return "add"; } } protected override Object GetElementKey(ConfigurationElement element) { TagPrefixInfo info = (TagPrefixInfo)element; if (String.IsNullOrEmpty(info.TagName)) { return info.TagPrefix + ":" + info.Namespace + ":" + (String.IsNullOrEmpty(info.Assembly) ? string.Empty : info.Assembly); } else { return info.TagPrefix + ":" + info.TagName; } } } } // 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
- FrugalList.cs
- CqlLexer.cs
- ExtensionQuery.cs
- TextClipboardData.cs
- ObjectDisposedException.cs
- PluggableProtocol.cs
- CleanUpVirtualizedItemEventArgs.cs
- TypeSystem.cs
- ListViewTableCell.cs
- UpdateCommandGenerator.cs
- ControlBuilder.cs
- StandardBindingOptionalReliableSessionElement.cs
- UmAlQuraCalendar.cs
- Permission.cs
- DateTimeValueSerializerContext.cs
- TextTrailingWordEllipsis.cs
- ThreadNeutralSemaphore.cs
- PrinterUnitConvert.cs
- TextTreeNode.cs
- ButtonRenderer.cs
- Geometry.cs
- CodeAttributeDeclarationCollection.cs
- SevenBitStream.cs
- LocatorBase.cs
- SettingsPropertyWrongTypeException.cs
- Point3DAnimationUsingKeyFrames.cs
- Italic.cs
- AnnotationMap.cs
- XamlHttpHandlerFactory.cs
- SkipQueryOptionExpression.cs
- NotifyParentPropertyAttribute.cs
- XpsThumbnail.cs
- sqlstateclientmanager.cs
- DataGridViewRowStateChangedEventArgs.cs
- DocumentPageViewAutomationPeer.cs
- PolyBezierSegment.cs
- HotSpotCollection.cs
- StorageBasedPackageProperties.cs
- DataGridViewIntLinkedList.cs
- MetabaseServerConfig.cs
- CollectionTypeElement.cs
- QilReference.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- LocalizationCodeDomSerializer.cs
- Content.cs
- processwaithandle.cs
- MimeTypePropertyAttribute.cs
- EntityUtil.cs
- CompilationAssemblyInstallComponent.cs
- QueryExtender.cs
- ToolStripMenuItemDesigner.cs
- Math.cs
- Zone.cs
- CacheVirtualItemsEvent.cs
- CodeArrayIndexerExpression.cs
- QilUnary.cs
- LayoutTable.cs
- UpdatableGenericsFeature.cs
- NamespaceMapping.cs
- ProfileService.cs
- ManagedIStream.cs
- LedgerEntry.cs
- XappLauncher.cs
- PlaceHolder.cs
- EventLogInformation.cs
- HandleCollector.cs
- ObjectItemAttributeAssemblyLoader.cs
- _DynamicWinsockMethods.cs
- SaveFileDialog.cs
- ProcessHostFactoryHelper.cs
- BackgroundFormatInfo.cs
- FormsAuthenticationUser.cs
- SecurityContext.cs
- MessageSmuggler.cs
- BindableTemplateBuilder.cs
- ElementUtil.cs
- ConnectionProviderAttribute.cs
- BasicHttpSecurityMode.cs
- keycontainerpermission.cs
- ControlBindingsCollection.cs
- FontEmbeddingManager.cs
- TextRangeAdaptor.cs
- MultipartContentParser.cs
- IndentTextWriter.cs
- DictionaryItemsCollection.cs
- AttachedPropertyMethodSelector.cs
- AbsoluteQuery.cs
- SQLSingleStorage.cs
- FamilyMap.cs
- TargetControlTypeCache.cs
- TreeNodeStyleCollection.cs
- TextComposition.cs
- EncryptedReference.cs
- ListViewDesigner.cs
- ToolStripSplitButton.cs
- DataTableClearEvent.cs
- MouseWheelEventArgs.cs
- TextElementEditingBehaviorAttribute.cs
- IndentTextWriter.cs
- DotNetATv1WindowsLogEntryDeserializer.cs