Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / ProfileSettingsCollection.cs / 4 / 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) { ConfigurationElement element = BaseGet((Object)name); return (element != null) ? BaseIndexOf(element) : -1; } public void Remove(String name) { BaseRemove(name); } public bool Contains(String name) { return (IndexOf(name) != -1); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlProps.cs
- OleDbCommandBuilder.cs
- Control.cs
- FontResourceCache.cs
- BuildManagerHost.cs
- WindowsFormsHostPropertyMap.cs
- TimeSpanSecondsConverter.cs
- FastPropertyAccessor.cs
- FindCriteriaCD1.cs
- XmlReaderSettings.cs
- SerializationInfo.cs
- SoundPlayer.cs
- Operators.cs
- FontCollection.cs
- DataConnectionHelper.cs
- UserPreferenceChangingEventArgs.cs
- WorkflowRuntimeServiceElement.cs
- MenuAdapter.cs
- InternalCache.cs
- SchemaMerger.cs
- Classification.cs
- HtmlEmptyTagControlBuilder.cs
- XmlnsDefinitionAttribute.cs
- Configuration.cs
- ServiceDescriptionContext.cs
- TreeNodeBindingCollection.cs
- GradientStop.cs
- Propagator.Evaluator.cs
- ClientTargetCollection.cs
- Vector3DCollectionValueSerializer.cs
- TableLayoutPanel.cs
- CharacterBuffer.cs
- GenericsInstances.cs
- NameTable.cs
- ProfilePropertySettingsCollection.cs
- AuthorizationSection.cs
- WorkflowDesignerColors.cs
- PerformanceCounterLib.cs
- DefaultBinder.cs
- SharedMemory.cs
- TargetInvocationException.cs
- LinkTarget.cs
- Error.cs
- Canvas.cs
- EntityDataSourceColumn.cs
- ProxyGenerator.cs
- DelegatedStream.cs
- DeflateStream.cs
- ProcessModelInfo.cs
- WindowsTooltip.cs
- ErrorFormatterPage.cs
- EnvelopedSignatureTransform.cs
- FactoryId.cs
- DataObjectMethodAttribute.cs
- AdRotator.cs
- ColumnProvider.cs
- StreamWriter.cs
- WebDescriptionAttribute.cs
- RSACryptoServiceProvider.cs
- FolderLevelBuildProvider.cs
- DBDataPermission.cs
- LinkConverter.cs
- UdpReplyToBehavior.cs
- COM2IProvidePropertyBuilderHandler.cs
- smtppermission.cs
- EventRoute.cs
- InvocationExpression.cs
- Types.cs
- _OverlappedAsyncResult.cs
- FormViewDeleteEventArgs.cs
- FlowPosition.cs
- SrgsElement.cs
- AttachedPropertyBrowsableAttribute.cs
- TriggerCollection.cs
- CapiNative.cs
- ContentPropertyAttribute.cs
- OdbcEnvironmentHandle.cs
- DataKeyCollection.cs
- BookmarkCallbackWrapper.cs
- SchemaNamespaceManager.cs
- ContextMenuService.cs
- ContextMarshalException.cs
- BufferAllocator.cs
- SqlException.cs
- NegatedConstant.cs
- RegionIterator.cs
- Compilation.cs
- ClientApiGenerator.cs
- Point3DValueSerializer.cs
- ApplicationBuildProvider.cs
- CollectionAdapters.cs
- HMACRIPEMD160.cs
- XmlSchemaComplexContentExtension.cs
- returneventsaver.cs
- SizeChangedEventArgs.cs
- ObjectSet.cs
- Wildcard.cs
- BuildProvider.cs
- ConfigXmlText.cs
- RectIndependentAnimationStorage.cs