Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / ProfileSettingsCollection.cs / 6 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ArrayElementGridEntry.cs
- ResourceSet.cs
- UICuesEvent.cs
- DataGridState.cs
- TrackingValidationObjectDictionary.cs
- CaseInsensitiveOrdinalStringComparer.cs
- UriWriter.cs
- InputBindingCollection.cs
- GeometryModel3D.cs
- exports.cs
- storepermission.cs
- TextReturnReader.cs
- SwitchLevelAttribute.cs
- PersonalizationProvider.cs
- FrameworkPropertyMetadata.cs
- TextEditorSelection.cs
- DataGridViewColumn.cs
- ICspAsymmetricAlgorithm.cs
- Image.cs
- Int32Storage.cs
- RecognizedAudio.cs
- URLString.cs
- Int16Converter.cs
- LeafCellTreeNode.cs
- SqlNotificationRequest.cs
- LocalizationParserHooks.cs
- OdbcCommandBuilder.cs
- DBProviderConfigurationHandler.cs
- FlowDocumentFormatter.cs
- BamlCollectionHolder.cs
- SocketPermission.cs
- ListViewCancelEventArgs.cs
- DocumentXPathNavigator.cs
- PeerCustomResolverBindingElement.cs
- CqlParser.cs
- documentation.cs
- ToolStripItemRenderEventArgs.cs
- FileDialog_Vista_Interop.cs
- WebPartRestoreVerb.cs
- NeutralResourcesLanguageAttribute.cs
- PerfProviderCollection.cs
- OdbcEnvironmentHandle.cs
- SecurityHeader.cs
- DispatcherHooks.cs
- SplitterPanelDesigner.cs
- AnchoredBlock.cs
- ChtmlPageAdapter.cs
- WebPartConnectionsDisconnectVerb.cs
- AppSecurityManager.cs
- WebPartCatalogAddVerb.cs
- EncoderReplacementFallback.cs
- RichTextBox.cs
- RawStylusInputCustomDataList.cs
- PathSegment.cs
- TableLayout.cs
- UIElement.cs
- StreamWriter.cs
- TimersDescriptionAttribute.cs
- TextRunCacheImp.cs
- AuthenticationModuleElement.cs
- ConfigurationLocation.cs
- UseManagedPresentationBindingElement.cs
- WsdlBuildProvider.cs
- WorkflowWebHostingModule.cs
- FormViewActionList.cs
- Add.cs
- DataColumnMapping.cs
- SerializationBinder.cs
- GPPOINTF.cs
- XmlBinaryWriterSession.cs
- ContextStack.cs
- WebPartMenu.cs
- SqlProviderServices.cs
- SHA1Managed.cs
- SourceFileBuildProvider.cs
- ServiceDeploymentInfo.cs
- ClientBuildManagerCallback.cs
- GradientBrush.cs
- _IPv4Address.cs
- SwitchElementsCollection.cs
- DateTimeParse.cs
- StopStoryboard.cs
- LinkConverter.cs
- EndpointIdentity.cs
- XmlQueryContext.cs
- DetailsViewRowCollection.cs
- FloaterBaseParagraph.cs
- TextSegment.cs
- PolicyUnit.cs
- LinearGradientBrush.cs
- CheckBox.cs
- Command.cs
- ContainerVisual.cs
- SizeValueSerializer.cs
- CompilerScopeManager.cs
- SecurityDocument.cs
- HtmlWindowCollection.cs
- _TLSstream.cs
- EventListenerClientSide.cs
- DataError.cs