Code:
/ FX-1434 / FX-1434 / 1.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
- BlockCollection.cs
- URLBuilder.cs
- RequiredAttributeAttribute.cs
- XslException.cs
- Bitmap.cs
- SafePEFileHandle.cs
- Attributes.cs
- Helper.cs
- XsdCachingReader.cs
- AuthenticatingEventArgs.cs
- UnionCodeGroup.cs
- LicFileLicenseProvider.cs
- Icon.cs
- XslAstAnalyzer.cs
- PkcsMisc.cs
- MobileControl.cs
- CuspData.cs
- OperationAbortedException.cs
- XPathBinder.cs
- AssemblyBuilder.cs
- WebServiceClientProxyGenerator.cs
- Stopwatch.cs
- CustomBindingCollectionElement.cs
- DataGridView.cs
- FactoryGenerator.cs
- followingsibling.cs
- sapiproxy.cs
- DataException.cs
- OdbcEnvironmentHandle.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- DataKey.cs
- XpsFontSerializationService.cs
- SafeFileMapViewHandle.cs
- GridView.cs
- LoadWorkflowByKeyAsyncResult.cs
- Errors.cs
- ProxyWebPartConnectionCollection.cs
- OledbConnectionStringbuilder.cs
- DelegateHelpers.cs
- WebPart.cs
- RepeaterItemCollection.cs
- TimelineCollection.cs
- DuplicateDetector.cs
- LocatorBase.cs
- RtfNavigator.cs
- ConfigXmlWhitespace.cs
- PtsHelper.cs
- ConfigXmlWhitespace.cs
- X509Extension.cs
- Int32Converter.cs
- MimeTypeMapper.cs
- XmlObjectSerializerWriteContextComplex.cs
- QueryCacheKey.cs
- BindingOperations.cs
- CompensationDesigner.cs
- SqlXmlStorage.cs
- UnicodeEncoding.cs
- DispatcherHooks.cs
- ExpressionBindingCollection.cs
- CompiledRegexRunner.cs
- FlatButtonAppearance.cs
- PathBox.cs
- SystemUnicastIPAddressInformation.cs
- XmlSchemaRedefine.cs
- ArraySortHelper.cs
- Int64AnimationUsingKeyFrames.cs
- SubpageParagraph.cs
- DescendantOverDescendantQuery.cs
- ContourSegment.cs
- ToolZoneDesigner.cs
- AlternateView.cs
- FileLoadException.cs
- WSIdentityFaultException.cs
- Setter.cs
- StrongNameKeyPair.cs
- COM2Properties.cs
- TextDecorationUnitValidation.cs
- ColorContextHelper.cs
- AutomationPattern.cs
- NativeActivity.cs
- IIS7WorkerRequest.cs
- DataTransferEventArgs.cs
- ProjectionPlanCompiler.cs
- HttpDictionary.cs
- ConstructorNeedsTagAttribute.cs
- XmlSchemaGroup.cs
- DataGridLinkButton.cs
- CurrentChangingEventArgs.cs
- WmlPanelAdapter.cs
- ToolStripOverflow.cs
- ParallelLoopState.cs
- InternalControlCollection.cs
- FullTrustAssembly.cs
- Viewport3DAutomationPeer.cs
- AuthenticationServiceManager.cs
- QuinticEase.cs
- MethodBuilder.cs
- HScrollProperties.cs
- WsdlBuildProvider.cs
- CalendarAutoFormat.cs