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
- IERequestCache.cs
- ConfigurationLocationCollection.cs
- CryptoKeySecurity.cs
- TypeUnloadedException.cs
- WebResourceAttribute.cs
- ContentDisposition.cs
- XmlSignatureProperties.cs
- NativeActivity.cs
- securitycriticaldata.cs
- SpecularMaterial.cs
- UpdateTranslator.cs
- SmtpReplyReader.cs
- EntityTemplateFactory.cs
- Operator.cs
- ClientConfigPaths.cs
- SplitterCancelEvent.cs
- HttpPostProtocolReflector.cs
- DrawingContextDrawingContextWalker.cs
- ActiveXHelper.cs
- RenamedEventArgs.cs
- newinstructionaction.cs
- NavigationPropertyEmitter.cs
- AuthenticationSection.cs
- ConnectionManagementElement.cs
- __FastResourceComparer.cs
- MD5HashHelper.cs
- AssemblyNameUtility.cs
- DataListItemCollection.cs
- InheritanceService.cs
- AxisAngleRotation3D.cs
- ThreadNeutralSemaphore.cs
- RegexWriter.cs
- BrowserCapabilitiesFactoryBase.cs
- TraceProvider.cs
- SQLMoney.cs
- FileRecordSequenceHelper.cs
- MemoryResponseElement.cs
- MultiTrigger.cs
- EntityClientCacheKey.cs
- _SafeNetHandles.cs
- SafeFileMapViewHandle.cs
- SByte.cs
- ClaimTypeElement.cs
- AssemblyAssociatedContentFileAttribute.cs
- TextWriter.cs
- PageBuildProvider.cs
- XPathDescendantIterator.cs
- XmlSchemaSimpleContentRestriction.cs
- CommandTreeTypeHelper.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- ReservationCollection.cs
- XPathQueryGenerator.cs
- ScrollItemPatternIdentifiers.cs
- SqlCacheDependencySection.cs
- UIntPtr.cs
- ActiveDocumentEvent.cs
- EntityUtil.cs
- DbSetClause.cs
- SafeNativeHandle.cs
- SaveFileDialogDesigner.cs
- BaseUriHelper.cs
- AutomationPeer.cs
- SettingsPropertyIsReadOnlyException.cs
- CriticalExceptions.cs
- LambdaCompiler.Unary.cs
- CommandEventArgs.cs
- _NtlmClient.cs
- HotSpotCollection.cs
- ExpressionBuilderCollection.cs
- XamlHostingSectionGroup.cs
- SessionViewState.cs
- XNodeSchemaApplier.cs
- QuaternionKeyFrameCollection.cs
- ScrollChangedEventArgs.cs
- SecureConversationServiceElement.cs
- TextServicesContext.cs
- LinkButton.cs
- WebConfigurationHost.cs
- XsltContext.cs
- ByteBufferPool.cs
- CacheDependency.cs
- SafeMILHandle.cs
- SettingsPropertyValueCollection.cs
- ArgumentNullException.cs
- RawStylusInputReport.cs
- HotSpot.cs
- WindowsAuthenticationEventArgs.cs
- securitycriticaldata.cs
- PieceDirectory.cs
- TagPrefixInfo.cs
- ConfigurationElement.cs
- altserialization.cs
- MenuBase.cs
- Select.cs
- HttpApplicationFactory.cs
- ItemDragEvent.cs
- ToolStripCollectionEditor.cs
- HelpInfo.cs
- SqlSelectClauseBuilder.cs
- TaiwanCalendar.cs