Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ProfileSettingsCollection.cs / 2 / ProfileSettingsCollection.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.ComponentModel; using System.Web.Hosting; using System.Web.Util; using System.Web.Configuration; using System.Web.Management; using System.Web.Compilation; using System.Security.Permissions; [ConfigurationCollection(typeof(ProfileSettings))] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ProfileSettingsCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static ProfileSettingsCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public ProfileSettingsCollection() { } // public properties public ProfileSettings this[int index] { get { return (ProfileSettings)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public new ProfileSettings this[string key] { get { return (ProfileSettings)BaseGet(key); } } // Protected Overrides protected override ConfigurationElement CreateNewElement() { return new ProfileSettings(); } protected override Object GetElementKey(ConfigurationElement element) { return ((ProfileSettings)element).Name; } // public methods public void Add(ProfileSettings profilesSettings) { BaseAdd(profilesSettings); // add to the end of the list and dont overwrite dups! } public void Clear() { BaseClear(); } public void RemoveAt(int index) { BaseRemoveAt(index); } public void Insert(int index, ProfileSettings authorizationSettings) { BaseAdd(index, authorizationSettings); } public int IndexOf(String name) { return BaseIndexOf(BaseGet((Object)name)); } public void Remove(String name) { BaseRemove(name); } public bool Contains(String name) { return (IndexOf(name) != -1); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InternalUserCancelledException.cs
- BindingExpressionBase.cs
- DataStreams.cs
- GenericIdentity.cs
- WindowsRichEditRange.cs
- ScanQueryOperator.cs
- securitycriticaldataClass.cs
- Odbc32.cs
- TimerEventSubscription.cs
- QueryExpression.cs
- RuntimeHelpers.cs
- StringInfo.cs
- PropertyCondition.cs
- BaseTemplateBuildProvider.cs
- NullToBooleanConverter.cs
- CompilerState.cs
- ApplicationInfo.cs
- CompositeCollectionView.cs
- OrCondition.cs
- typedescriptorpermissionattribute.cs
- EastAsianLunisolarCalendar.cs
- WorkflowEventArgs.cs
- COMException.cs
- Compilation.cs
- AmbientProperties.cs
- FacetDescriptionElement.cs
- AppDomainResourcePerfCounters.cs
- XsltInput.cs
- PersonalizablePropertyEntry.cs
- Attributes.cs
- XmlReflectionImporter.cs
- UpdatePanelTrigger.cs
- TakeOrSkipWhileQueryOperator.cs
- DesignTimeData.cs
- Viewport3DAutomationPeer.cs
- TextModifier.cs
- IncrementalReadDecoders.cs
- BitmapEffectDrawingContent.cs
- BaseCAMarshaler.cs
- EntityEntry.cs
- CriticalFinalizerObject.cs
- GenericTransactionFlowAttribute.cs
- TypeSystemHelpers.cs
- ProxyHelper.cs
- WorkflowHostingEndpoint.cs
- StrokeDescriptor.cs
- DataSourceControlBuilder.cs
- StringInfo.cs
- SchemaComplexType.cs
- WriteFileContext.cs
- CharacterMetricsDictionary.cs
- NamespaceCollection.cs
- OneOfElement.cs
- OTFRasterizer.cs
- Sentence.cs
- SafeNativeMemoryHandle.cs
- FormsAuthenticationConfiguration.cs
- DesignColumn.cs
- DataTableReaderListener.cs
- PkcsMisc.cs
- _FtpDataStream.cs
- SqlExpressionNullability.cs
- IDReferencePropertyAttribute.cs
- DataGridRowEventArgs.cs
- MappingSource.cs
- SizeConverter.cs
- LingerOption.cs
- DropSourceBehavior.cs
- PassportPrincipal.cs
- ClonableStack.cs
- MonitoringDescriptionAttribute.cs
- OdbcConnectionFactory.cs
- CodeLabeledStatement.cs
- TypeSystemProvider.cs
- ControlCollection.cs
- Compress.cs
- DataControlCommands.cs
- WebReferenceOptions.cs
- PriorityBinding.cs
- RelationshipConverter.cs
- ServiceOperationParameter.cs
- OracleRowUpdatedEventArgs.cs
- HtmlMobileTextWriter.cs
- StringHandle.cs
- EdmComplexTypeAttribute.cs
- PrintPageEvent.cs
- TimeStampChecker.cs
- Cursors.cs
- BordersPage.cs
- SqlDataSourceQueryEditorForm.cs
- ImageMapEventArgs.cs
- CodePrimitiveExpression.cs
- NoPersistHandle.cs
- VisualTreeUtils.cs
- Compiler.cs
- AttributeCollection.cs
- FrameSecurityDescriptor.cs
- MachineSettingsSection.cs
- SaveFileDialog.cs
- EntityProxyFactory.cs