Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / ProfileSettingsCollection.cs / 1 / 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
- RowVisual.cs
- EntityException.cs
- MembershipSection.cs
- BitmapSizeOptions.cs
- PersistenceException.cs
- CategoryList.cs
- NavigationPropertyEmitter.cs
- InputLangChangeRequestEvent.cs
- DependencyObjectProvider.cs
- SimpleParser.cs
- KeyConstraint.cs
- ProfileProvider.cs
- TypedTableBaseExtensions.cs
- RegexNode.cs
- RuntimeArgument.cs
- AccessText.cs
- Tuple.cs
- TreeNodeCollection.cs
- SQLStringStorage.cs
- Tokenizer.cs
- ToolboxItem.cs
- XmlQueryRuntime.cs
- TextPointerBase.cs
- XDeferredAxisSource.cs
- CodeActivity.cs
- SmtpReplyReaderFactory.cs
- MD5.cs
- NullToBooleanConverter.cs
- CallSiteBinder.cs
- FillRuleValidation.cs
- XmlConvert.cs
- RichTextBoxAutomationPeer.cs
- AlignmentYValidation.cs
- StaticSiteMapProvider.cs
- ConnectionInterfaceCollection.cs
- BitmapImage.cs
- ZipIOExtraFieldPaddingElement.cs
- PersonalizableAttribute.cs
- PriorityChain.cs
- MobileTemplatedControlDesigner.cs
- BamlVersionHeader.cs
- DesignerDataView.cs
- ToolStripArrowRenderEventArgs.cs
- TransportChannelListener.cs
- ExternalFile.cs
- FragmentQuery.cs
- VersionedStream.cs
- ReflectPropertyDescriptor.cs
- TextShapeableCharacters.cs
- MetricEntry.cs
- WmlMobileTextWriter.cs
- PreservationFileReader.cs
- Registration.cs
- TogglePattern.cs
- PropertyDescriptorComparer.cs
- DataRowChangeEvent.cs
- FontDifferentiator.cs
- HashJoinQueryOperatorEnumerator.cs
- PropertyTabAttribute.cs
- Row.cs
- InternalTypeHelper.cs
- parserscommon.cs
- PackageDigitalSignatureManager.cs
- SHA1Managed.cs
- MutexSecurity.cs
- HttpWebResponse.cs
- FixedStringLookup.cs
- GridViewDeleteEventArgs.cs
- XmlSchemaParticle.cs
- PasswordTextContainer.cs
- NetNamedPipeBinding.cs
- Line.cs
- OdbcConnectionStringbuilder.cs
- TabControl.cs
- ColorIndependentAnimationStorage.cs
- VirtualDirectoryMapping.cs
- PixelFormat.cs
- Renderer.cs
- DataGridViewColumnEventArgs.cs
- _DisconnectOverlappedAsyncResult.cs
- NativeWindow.cs
- LostFocusEventManager.cs
- UnsafeNativeMethods.cs
- X509Certificate2.cs
- EmissiveMaterial.cs
- PersonalizationProviderCollection.cs
- ReadingWritingEntityEventArgs.cs
- ViewBox.cs
- FactoryMaker.cs
- WebPartDisplayModeEventArgs.cs
- DataServiceContext.cs
- RecordConverter.cs
- XmlILCommand.cs
- LinqDataSourceUpdateEventArgs.cs
- WindowPatternIdentifiers.cs
- UriGenerator.cs
- MetadataItemEmitter.cs
- LineGeometry.cs
- FullTextLine.cs
- AsyncStreamReader.cs