Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / HttpModuleCollection.cs / 1 / HttpModuleCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Collection of IHttpModules
*
* Copyright (c) 2000 Microsoft Corporation
*/
namespace System.Web {
using System.Runtime.InteropServices;
using System.Collections;
using System.Collections.Specialized;
using System.Web;
using System.Web.Util;
using System.Security.Permissions;
///
/// A collection of IHttpModules
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class HttpModuleCollection : NameObjectCollectionBase {
// cached All[] arrays
private IHttpModule[] _all;
private String[] _allKeys;
internal HttpModuleCollection() : base(Misc.CaseInsensitiveInvariantKeyComparer) {
}
///
/// [To be supplied.]
///
public void CopyTo(Array dest, int index) {
if (_all == null) {
int n = Count;
_all = new IHttpModule[n];
for (int i = 0; i < n; i++)
_all[i] = Get(i);
}
if (_all != null) {
_all.CopyTo(dest, index);
}
}
internal void AddModule(String name, IHttpModule m) {
_all = null;
_allKeys = null;
BaseAdd(name, m);
}
#if UNUSED
internal void Reset() {
_all = null;
_allKeys = null;
BaseClear();
}
#endif
//
// Access by name
//
///
/// [To be supplied.]
///
public IHttpModule Get(String name) {
return(IHttpModule)BaseGet(name);
}
///
/// [To be supplied.]
///
public IHttpModule this[String name]
{
get { return Get(name);}
}
//
// Indexed access
//
///
/// [To be supplied.]
///
public IHttpModule Get(int index) {
return(IHttpModule)BaseGet(index);
}
///
/// [To be supplied.]
///
public String GetKey(int index) {
return BaseGetKey(index);
}
///
/// [To be supplied.]
///
public IHttpModule this[int index]
{
get { return Get(index);}
}
//
// Access to keys and values as arrays
//
///
/// [To be supplied.]
///
public String[] AllKeys {
get {
if (_allKeys == null)
_allKeys = BaseGetAllKeys();
return _allKeys;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Collection of IHttpModules
*
* Copyright (c) 2000 Microsoft Corporation
*/
namespace System.Web {
using System.Runtime.InteropServices;
using System.Collections;
using System.Collections.Specialized;
using System.Web;
using System.Web.Util;
using System.Security.Permissions;
///
/// A collection of IHttpModules
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class HttpModuleCollection : NameObjectCollectionBase {
// cached All[] arrays
private IHttpModule[] _all;
private String[] _allKeys;
internal HttpModuleCollection() : base(Misc.CaseInsensitiveInvariantKeyComparer) {
}
///
/// [To be supplied.]
///
public void CopyTo(Array dest, int index) {
if (_all == null) {
int n = Count;
_all = new IHttpModule[n];
for (int i = 0; i < n; i++)
_all[i] = Get(i);
}
if (_all != null) {
_all.CopyTo(dest, index);
}
}
internal void AddModule(String name, IHttpModule m) {
_all = null;
_allKeys = null;
BaseAdd(name, m);
}
#if UNUSED
internal void Reset() {
_all = null;
_allKeys = null;
BaseClear();
}
#endif
//
// Access by name
//
///
/// [To be supplied.]
///
public IHttpModule Get(String name) {
return(IHttpModule)BaseGet(name);
}
///
/// [To be supplied.]
///
public IHttpModule this[String name]
{
get { return Get(name);}
}
//
// Indexed access
//
///
/// [To be supplied.]
///
public IHttpModule Get(int index) {
return(IHttpModule)BaseGet(index);
}
///
/// [To be supplied.]
///
public String GetKey(int index) {
return BaseGetKey(index);
}
///
/// [To be supplied.]
///
public IHttpModule this[int index]
{
get { return Get(index);}
}
//
// Access to keys and values as arrays
//
///
/// [To be supplied.]
///
public String[] AllKeys {
get {
if (_allKeys == null)
_allKeys = BaseGetAllKeys();
return _allKeys;
}
}
}
}
// 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
- ListViewItem.cs
- InternalConfigEventArgs.cs
- IgnoreSection.cs
- Material.cs
- DataContractSerializerSection.cs
- WindowsStatusBar.cs
- CTreeGenerator.cs
- ServiceObjectContainer.cs
- TextServicesManager.cs
- BaseParaClient.cs
- XmlStreamStore.cs
- StandardBindingElement.cs
- CategoryNameCollection.cs
- CodeMemberField.cs
- Int32EqualityComparer.cs
- SerialReceived.cs
- KeyboardEventArgs.cs
- HttpApplicationFactory.cs
- DBPropSet.cs
- LexicalChunk.cs
- LogManagementAsyncResult.cs
- MeshGeometry3D.cs
- ConnectionString.cs
- SwitchElementsCollection.cs
- Menu.cs
- TransactionFlowBindingElement.cs
- InputMethodStateChangeEventArgs.cs
- DetailsViewModeEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- CompilerState.cs
- TagPrefixInfo.cs
- Panel.cs
- WebPartEventArgs.cs
- StringStorage.cs
- BufferedGraphicsManager.cs
- AccessDataSourceDesigner.cs
- FormViewDeletedEventArgs.cs
- DesignerActionGlyph.cs
- GenericAuthenticationEventArgs.cs
- WebGetAttribute.cs
- FilePrompt.cs
- WindowsTooltip.cs
- DataPagerFieldCommandEventArgs.cs
- DispatchOperationRuntime.cs
- TextBoxRenderer.cs
- ImageButton.cs
- Annotation.cs
- DefaultAsyncDataDispatcher.cs
- DataFormats.cs
- DynamicControl.cs
- TextTreePropertyUndoUnit.cs
- DeploymentSection.cs
- PathSegment.cs
- WorkflowItemPresenter.cs
- CultureInfoConverter.cs
- AgileSafeNativeMemoryHandle.cs
- Point3DKeyFrameCollection.cs
- FormClosingEvent.cs
- ScriptReferenceBase.cs
- EncryptedKey.cs
- InteropDesigner.xaml.cs
- CollaborationHelperFunctions.cs
- ImportCatalogPart.cs
- ImportException.cs
- CultureInfo.cs
- MailSettingsSection.cs
- MessageDescriptionCollection.cs
- DesignTimeParseData.cs
- MenuCommand.cs
- ResourceLoader.cs
- TemplateBindingExpressionConverter.cs
- cookiecollection.cs
- SyndicationSerializer.cs
- safesecurityhelperavalon.cs
- StrokeFIndices.cs
- TransformerTypeCollection.cs
- FormatVersion.cs
- Math.cs
- WebPartsSection.cs
- DependencyObjectProvider.cs
- Vector.cs
- GridToolTip.cs
- TypeRefElement.cs
- cookie.cs
- HttpCachePolicy.cs
- CqlLexer.cs
- FileClassifier.cs
- ToolboxService.cs
- CharConverter.cs
- Publisher.cs
- AdapterDictionary.cs
- MissingMethodException.cs
- EdmProviderManifest.cs
- Panel.cs
- WebPartsPersonalizationAuthorization.cs
- TeredoHelper.cs
- SafeViewOfFileHandle.cs
- QilTernary.cs
- SystemSounds.cs
- IdlingCommunicationPool.cs