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
- HtmlInputRadioButton.cs
- PnrpPermission.cs
- HttpContextServiceHost.cs
- BidOverLoads.cs
- BinaryObjectReader.cs
- RequestDescription.cs
- Icon.cs
- TextRangeSerialization.cs
- _BufferOffsetSize.cs
- TTSVoice.cs
- WebPartConnection.cs
- SecuritySessionSecurityTokenProvider.cs
- MenuBase.cs
- ResumeStoryboard.cs
- WindowAutomationPeer.cs
- DebugView.cs
- newitemfactory.cs
- XmlEncoding.cs
- XsdDuration.cs
- RectangleConverter.cs
- XmlExceptionHelper.cs
- SettingsProviderCollection.cs
- PersonalizationProvider.cs
- OperationDescription.cs
- DatagridviewDisplayedBandsData.cs
- GorillaCodec.cs
- AmbientValueAttribute.cs
- MsmqAuthenticationMode.cs
- MethodAccessException.cs
- PingReply.cs
- Accessible.cs
- RoleGroup.cs
- SubtreeProcessor.cs
- ConnectionPoint.cs
- HtmlInputControl.cs
- FixedTextSelectionProcessor.cs
- DeflateStream.cs
- CodeDomLoader.cs
- FileLoadException.cs
- DataList.cs
- RouteData.cs
- ProgressChangedEventArgs.cs
- CharKeyFrameCollection.cs
- KeyPullup.cs
- SessionEndingCancelEventArgs.cs
- FeatureSupport.cs
- WorkflowControlClient.cs
- ValidatorAttribute.cs
- DbConnectionPool.cs
- StandardBindingCollectionElement.cs
- OleAutBinder.cs
- SoapAttributeOverrides.cs
- OrthographicCamera.cs
- LogLogRecord.cs
- CompositeControl.cs
- DataMemberAttribute.cs
- BindingManagerDataErrorEventArgs.cs
- AuthStoreRoleProvider.cs
- DesignSurfaceServiceContainer.cs
- CultureMapper.cs
- DataControlFieldHeaderCell.cs
- ProgressBar.cs
- ObjectContextServiceProvider.cs
- IPipelineRuntime.cs
- ManipulationDelta.cs
- UriTemplateTable.cs
- GroupItem.cs
- FixedSOMLineCollection.cs
- ProfileManager.cs
- DataGridViewRowsRemovedEventArgs.cs
- HttpModulesSection.cs
- CapabilitiesPattern.cs
- NotCondition.cs
- EtwTrace.cs
- DragCompletedEventArgs.cs
- AssemblyUtil.cs
- COM2Properties.cs
- RemotingSurrogateSelector.cs
- Permission.cs
- ImageIndexConverter.cs
- infer.cs
- ThousandthOfEmRealDoubles.cs
- SignerInfo.cs
- GridViewColumn.cs
- DiscoveryRequestHandler.cs
- CompilerLocalReference.cs
- DbException.cs
- MatrixAnimationUsingPath.cs
- ParentControlDesigner.cs
- Cloud.cs
- JoinTreeNode.cs
- ReflectTypeDescriptionProvider.cs
- SqlBulkCopyColumnMappingCollection.cs
- WebRequest.cs
- ElapsedEventArgs.cs
- SecureStringHasher.cs
- ToolStripRenderer.cs
- LongTypeConverter.cs
- MatrixUtil.cs
- lengthconverter.cs