Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / ProfileSettingsCollection.cs / 1305376 / 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))] 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))] 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
- GridLengthConverter.cs
- InstalledFontCollection.cs
- AnnotationAdorner.cs
- _ConnectStream.cs
- InvalidCastException.cs
- OrderedDictionary.cs
- tibetanshape.cs
- ScrollItemPatternIdentifiers.cs
- TableDetailsCollection.cs
- XmlAttributeHolder.cs
- _BufferOffsetSize.cs
- CultureMapper.cs
- ResumeStoryboard.cs
- RangeValuePattern.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- MinMaxParagraphWidth.cs
- SqlDataSourceFilteringEventArgs.cs
- XmlSchemaComplexType.cs
- WindowsAltTab.cs
- PreviewPrintController.cs
- UserControlAutomationPeer.cs
- MeshGeometry3D.cs
- ColumnTypeConverter.cs
- XPathDocument.cs
- EncoderFallback.cs
- DesignerActionHeaderItem.cs
- XmlILTrace.cs
- DoubleCollectionConverter.cs
- Polyline.cs
- VectorValueSerializer.cs
- SystemUdpStatistics.cs
- QueryCacheKey.cs
- SchemaObjectWriter.cs
- PolyLineSegment.cs
- MLangCodePageEncoding.cs
- DBDataPermissionAttribute.cs
- HuffModule.cs
- ToolStripCodeDomSerializer.cs
- GridViewSelectEventArgs.cs
- DataComponentNameHandler.cs
- DbConnectionPool.cs
- SqlParameterizer.cs
- SystemIPGlobalProperties.cs
- Selector.cs
- InstanceKeyView.cs
- StatusBarDrawItemEvent.cs
- ExpressionBuilder.cs
- PenContexts.cs
- XmlDocument.cs
- TextEditorMouse.cs
- Message.cs
- BitmapEffectInput.cs
- SharedStatics.cs
- PopupRoot.cs
- DESCryptoServiceProvider.cs
- XsltContext.cs
- GridViewColumnHeader.cs
- SpStreamWrapper.cs
- PrintingPermissionAttribute.cs
- SynchronizedInputProviderWrapper.cs
- PageCache.cs
- XmlSchemaSet.cs
- XPathMultyIterator.cs
- ActivityExecutorDelegateInfo.cs
- SymmetricKey.cs
- ControlBindingsConverter.cs
- TextEditorDragDrop.cs
- SmiContextFactory.cs
- WindowsHyperlink.cs
- WebDisplayNameAttribute.cs
- SurrogateEncoder.cs
- AsyncOperation.cs
- Set.cs
- Point3DAnimationBase.cs
- ForceCopyBuildProvider.cs
- MouseOverProperty.cs
- PermissionToken.cs
- Enlistment.cs
- SurrogateEncoder.cs
- CommonProperties.cs
- RegexGroup.cs
- StaticFileHandler.cs
- SamlSubjectStatement.cs
- KeyValueConfigurationElement.cs
- HyperLinkStyle.cs
- DynamicMethod.cs
- Point4DConverter.cs
- TextBoxView.cs
- FontWeightConverter.cs
- securitycriticaldataformultiplegetandset.cs
- ConfigPathUtility.cs
- UnSafeCharBuffer.cs
- CrossContextChannel.cs
- DependsOnAttribute.cs
- _AcceptOverlappedAsyncResult.cs
- AggregatePushdown.cs
- DetailsViewUpdateEventArgs.cs
- HtmlSelect.cs
- IfJoinedCondition.cs
- CheckBox.cs