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
- _PooledStream.cs
- SqlUserDefinedTypeAttribute.cs
- SocketAddress.cs
- DataListItemEventArgs.cs
- ProxyGenerationError.cs
- NameScopePropertyAttribute.cs
- ItemCollection.cs
- ManagedCodeMarkers.cs
- ActivityDesignerHighlighter.cs
- OverrideMode.cs
- FixedTextPointer.cs
- CodeSnippetStatement.cs
- TextEditorContextMenu.cs
- ListBase.cs
- PictureBox.cs
- VerticalAlignConverter.cs
- sqlstateclientmanager.cs
- PointAnimation.cs
- Bidi.cs
- RawUIStateInputReport.cs
- WebEventTraceProvider.cs
- OracleDataReader.cs
- SystemIcmpV6Statistics.cs
- translator.cs
- StylusLogic.cs
- TextComposition.cs
- HtmlTextViewAdapter.cs
- AutomationPropertyInfo.cs
- ScriptRef.cs
- SafeHandles.cs
- SemanticValue.cs
- ZipIOBlockManager.cs
- ElementProxy.cs
- MiniParameterInfo.cs
- ExpressionBuilder.cs
- GAC.cs
- xmlformatgeneratorstatics.cs
- Blend.cs
- Profiler.cs
- EventDescriptor.cs
- BrowserCapabilitiesFactoryBase.cs
- LoginCancelEventArgs.cs
- DataGridViewBand.cs
- DatePicker.cs
- WinEventHandler.cs
- XmlSchemaImporter.cs
- StretchValidation.cs
- MetaModel.cs
- DeferredTextReference.cs
- SystemDiagnosticsSection.cs
- OutputCacheProfile.cs
- Random.cs
- DataRowExtensions.cs
- FormParameter.cs
- WebControlParameterProxy.cs
- BitStack.cs
- FtpCachePolicyElement.cs
- Compiler.cs
- StatusStrip.cs
- EventDriven.cs
- InkCanvasSelection.cs
- MembershipUser.cs
- DbConnectionFactory.cs
- SerialStream.cs
- DoubleLinkListEnumerator.cs
- SafeEventLogWriteHandle.cs
- GenericQueueSurrogate.cs
- TimersDescriptionAttribute.cs
- CharacterShapingProperties.cs
- ColumnHeader.cs
- ReflectEventDescriptor.cs
- HttpHostedTransportConfiguration.cs
- MaskPropertyEditor.cs
- DesignOnlyAttribute.cs
- ProvidePropertyAttribute.cs
- PolicyUnit.cs
- HtmlTableRowCollection.cs
- SqlMethods.cs
- Addressing.cs
- CalendarDay.cs
- Literal.cs
- CodeDomExtensionMethods.cs
- StrongNamePublicKeyBlob.cs
- SettingsBase.cs
- Socket.cs
- DocumentPageHost.cs
- SHA256.cs
- RequestQueue.cs
- CustomErrorsSection.cs
- DeferredBinaryDeserializerExtension.cs
- SafeFileMappingHandle.cs
- WindowsAuthenticationEventArgs.cs
- CodeBinaryOperatorExpression.cs
- ConnectionStringsSection.cs
- BaseAppDomainProtocolHandler.cs
- MenuItemStyleCollection.cs
- SqlProfileProvider.cs
- TimelineCollection.cs
- IconHelper.cs
- ZipIOEndOfCentralDirectoryBlock.cs