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
- SelectionPattern.cs
- PathParser.cs
- Vector3D.cs
- Decoder.cs
- TdsParser.cs
- HttpCachePolicy.cs
- SplitterDesigner.cs
- PaperSource.cs
- TypeInitializationException.cs
- ComponentCommands.cs
- CodeStatement.cs
- tooltip.cs
- ConnectionPool.cs
- DataDocumentXPathNavigator.cs
- Win32Native.cs
- RotationValidation.cs
- HideDisabledControlAdapter.cs
- EditorPart.cs
- GifBitmapEncoder.cs
- Types.cs
- PrintPageEvent.cs
- FunctionNode.cs
- CrossAppDomainChannel.cs
- TempFiles.cs
- CuspData.cs
- StorageEntitySetMapping.cs
- EncryptedReference.cs
- ThrowHelper.cs
- Mappings.cs
- TypeTypeConverter.cs
- CallbackValidatorAttribute.cs
- ScopelessEnumAttribute.cs
- XmlEntityReference.cs
- ListViewItemSelectionChangedEvent.cs
- SafeSecurityHelper.cs
- WebPartZone.cs
- ToolStripEditorManager.cs
- CodeExpressionStatement.cs
- DictionaryManager.cs
- XmlReaderSettings.cs
- OpenFileDialog.cs
- SqlClientWrapperSmiStream.cs
- AssemblyCache.cs
- KeyValuePair.cs
- TcpProcessProtocolHandler.cs
- ProxyElement.cs
- BuiltInPermissionSets.cs
- List.cs
- SubpageParaClient.cs
- DictionaryEntry.cs
- XmlWellformedWriterHelpers.cs
- ConnectionInterfaceCollection.cs
- TableRow.cs
- ObjectTag.cs
- MailWebEventProvider.cs
- SqlDataSourceAdvancedOptionsForm.cs
- ListBoxItem.cs
- DrawingBrush.cs
- DesignerInterfaces.cs
- DecimalAnimation.cs
- StrongNamePublicKeyBlob.cs
- FileDialogCustomPlace.cs
- RegisteredArrayDeclaration.cs
- WorkflowInstanceContextProvider.cs
- MetadataSource.cs
- BoolExpression.cs
- Quaternion.cs
- ConfigurationManagerHelperFactory.cs
- SqlDependencyUtils.cs
- SqlClientMetaDataCollectionNames.cs
- ValidatorUtils.cs
- HttpContext.cs
- DbReferenceCollection.cs
- BooleanKeyFrameCollection.cs
- SafeNativeHandle.cs
- WebBaseEventKeyComparer.cs
- objectquery_tresulttype.cs
- Cursors.cs
- OpenTypeCommon.cs
- NullableConverter.cs
- LiteralControl.cs
- ItemMap.cs
- CollectionChangedEventManager.cs
- tabpagecollectioneditor.cs
- GridViewRowEventArgs.cs
- BufferedStream2.cs
- Attributes.cs
- PauseStoryboard.cs
- ProxyWebPartManager.cs
- Sorting.cs
- PartialCachingAttribute.cs
- SqlParameterizer.cs
- MessageDirection.cs
- StructuralType.cs
- TextRangeAdaptor.cs
- DbConnectionPoolIdentity.cs
- DetailsViewInsertedEventArgs.cs
- OleServicesContext.cs
- ObjectDataSourceSelectingEventArgs.cs
- CheckBoxPopupAdapter.cs