Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / CodeSubDirectoriesCollection.cs / 2 / CodeSubDirectoriesCollection.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.Globalization; using System.IO; using System.Text; using System.Web.Compilation; using System.Reflection; using System.Web.Hosting; using System.Web.UI; using System.CodeDom.Compiler; using System.Web.Util; using System.ComponentModel; using System.Security.Permissions; [ConfigurationCollection(typeof(CodeSubDirectory), CollectionType = ConfigurationElementCollectionType.BasicMap)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class CodeSubDirectoriesCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; private bool _didRuntimeValidation; static CodeSubDirectoriesCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } public CodeSubDirectoriesCollection() : base(StringComparer.OrdinalIgnoreCase) { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public CodeSubDirectory this[int index] { get { return (CodeSubDirectory)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public void Add(CodeSubDirectory codeSubDirectory) { BaseAdd(codeSubDirectory); } public void Clear() { BaseClear(); } public void Remove(string directoryName) { BaseRemove(directoryName); } public void RemoveAt(int index) { BaseRemoveAt(index); } public override ConfigurationElementCollectionType CollectionType { get { return ConfigurationElementCollectionType.BasicMap; } } protected override ConfigurationElement CreateNewElement() { return new CodeSubDirectory(); } protected override string ElementName { get { return "add"; } } protected override Object GetElementKey(ConfigurationElement element) { return ((CodeSubDirectory)element).DirectoryName; } // Validate the element for runtime use internal void EnsureRuntimeValidation() { if (_didRuntimeValidation) { return; } foreach (CodeSubDirectory subDir in this) { subDir.DoRuntimeValidation(); } _didRuntimeValidation = true; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeTokenHandle.cs
- SiteMapHierarchicalDataSourceView.cs
- MsmqBindingElementBase.cs
- XmlnsDefinitionAttribute.cs
- _NtlmClient.cs
- PeerOutputChannel.cs
- OletxEnlistment.cs
- TextLineResult.cs
- TemplatePropertyEntry.cs
- ToolStripArrowRenderEventArgs.cs
- AppDomainManager.cs
- DropShadowEffect.cs
- TextDocumentView.cs
- PackWebRequestFactory.cs
- HasCopySemanticsAttribute.cs
- AnnotationObservableCollection.cs
- SmtpNetworkElement.cs
- DataGridRowHeader.cs
- TextRangeEditLists.cs
- OraclePermission.cs
- TimeSpanOrInfiniteValidator.cs
- ZipFileInfo.cs
- WebPartVerbsEventArgs.cs
- WorkflowShape.cs
- TextHidden.cs
- CachedTypeface.cs
- ListBoxChrome.cs
- CngKey.cs
- ChannelTokenTypeConverter.cs
- XamlInt32CollectionSerializer.cs
- RayMeshGeometry3DHitTestResult.cs
- SectionXmlInfo.cs
- PersistenceTypeAttribute.cs
- SafeNativeMethods.cs
- RegularExpressionValidator.cs
- ThreadAttributes.cs
- SelectionUIHandler.cs
- FixedTextContainer.cs
- GroupAggregateExpr.cs
- Listbox.cs
- ExclusiveCanonicalizationTransform.cs
- InstanceView.cs
- EditorPart.cs
- TextEffect.cs
- XmlDictionaryString.cs
- DateTimeConverter.cs
- Command.cs
- ResourceDescriptionAttribute.cs
- DataFormats.cs
- FontInfo.cs
- HMACSHA256.cs
- PointF.cs
- FreezableOperations.cs
- RootProfilePropertySettingsCollection.cs
- MailHeaderInfo.cs
- ObjectSecurityT.cs
- ConnectionProviderAttribute.cs
- SpecialFolderEnumConverter.cs
- SmtpCommands.cs
- Vector.cs
- IISUnsafeMethods.cs
- InstancePersistenceContext.cs
- DataServiceExpressionVisitor.cs
- OdbcConnectionString.cs
- ScriptResourceInfo.cs
- AstTree.cs
- WebPartConnectionsCancelEventArgs.cs
- CompositeDataBoundControl.cs
- Int32Animation.cs
- SQLResource.cs
- CodeCatchClauseCollection.cs
- PackageRelationshipSelector.cs
- AtomContentProperty.cs
- MasterPageParser.cs
- UIElementCollection.cs
- ValidationPropertyAttribute.cs
- GeneralTransform3D.cs
- ApplicationCommands.cs
- ColorKeyFrameCollection.cs
- ModuleElement.cs
- PrivacyNoticeBindingElementImporter.cs
- SafeRegistryHandle.cs
- _ConnectStream.cs
- PathParser.cs
- ArrangedElementCollection.cs
- DeviceContext2.cs
- MostlySingletonList.cs
- MdiWindowListItemConverter.cs
- followingsibling.cs
- ThaiBuddhistCalendar.cs
- NamespaceList.cs
- ClientTargetSection.cs
- DoubleAverageAggregationOperator.cs
- XmlSchemaIdentityConstraint.cs
- CaseInsensitiveHashCodeProvider.cs
- WebScriptEnablingBehavior.cs
- __TransparentProxy.cs
- TemplatedAdorner.cs
- ListSourceHelper.cs
- FileLoadException.cs