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
- ComponentResourceKey.cs
- DocumentPageViewAutomationPeer.cs
- StorageEntityTypeMapping.cs
- WebPartAuthorizationEventArgs.cs
- ClientTarget.cs
- TextComposition.cs
- AttachedAnnotationChangedEventArgs.cs
- ComboBoxItem.cs
- EventsTab.cs
- SchemaImporterExtension.cs
- CodeObject.cs
- InvalidOperationException.cs
- WebPartDisplayModeCollection.cs
- ParsedAttributeCollection.cs
- IncrementalReadDecoders.cs
- SmtpMail.cs
- HtmlDocument.cs
- SafeEventLogWriteHandle.cs
- DataObjectEventArgs.cs
- SQLMoney.cs
- SqlTriggerContext.cs
- ClaimTypes.cs
- TdsValueSetter.cs
- TypeDescriptor.cs
- CodeAttachEventStatement.cs
- TypeSystem.cs
- RayMeshGeometry3DHitTestResult.cs
- StorageMappingItemCollection.cs
- Stroke2.cs
- TiffBitmapEncoder.cs
- CustomTokenProvider.cs
- CharKeyFrameCollection.cs
- SemaphoreSecurity.cs
- DecoderNLS.cs
- SafeHandle.cs
- Cursors.cs
- TimeSpanOrInfiniteValidator.cs
- XmlDataSource.cs
- TextSimpleMarkerProperties.cs
- Stylesheet.cs
- Sequence.cs
- RelationHandler.cs
- Renderer.cs
- XmlNavigatorFilter.cs
- SpStreamWrapper.cs
- SplineKeyFrames.cs
- WindowsRichEdit.cs
- AttachedAnnotation.cs
- SamlAssertionKeyIdentifierClause.cs
- DataGridTablesFactory.cs
- ScriptManagerProxy.cs
- DomNameTable.cs
- RootBrowserWindowProxy.cs
- InitializationEventAttribute.cs
- Math.cs
- StoragePropertyMapping.cs
- ServiceManager.cs
- BulletChrome.cs
- Double.cs
- SelectionRange.cs
- ErrorRuntimeConfig.cs
- ProtocolElementCollection.cs
- VerificationException.cs
- HandlerFactoryCache.cs
- Screen.cs
- Clipboard.cs
- HostProtectionException.cs
- arc.cs
- DispatcherObject.cs
- LineSegment.cs
- ExecutedRoutedEventArgs.cs
- ThreadExceptionDialog.cs
- AutoScrollHelper.cs
- DocumentAutomationPeer.cs
- SamlAuthenticationClaimResource.cs
- Timeline.cs
- NamespaceCollection.cs
- ErrorHandlerModule.cs
- NextPreviousPagerField.cs
- CompiledWorkflowDefinitionContext.cs
- SafeLibraryHandle.cs
- ResourceReader.cs
- SqlIdentifier.cs
- RecognizeCompletedEventArgs.cs
- LineServices.cs
- HashCodeCombiner.cs
- SymLanguageVendor.cs
- StylusDevice.cs
- Frame.cs
- DateTimeConstantAttribute.cs
- WindowsListViewItemCheckBox.cs
- EmissiveMaterial.cs
- AdRotator.cs
- AssemblyBuilder.cs
- RubberbandSelector.cs
- StreamedFramingRequestChannel.cs
- ServiceXNameTypeConverter.cs
- IChannel.cs
- ToolTipService.cs
- ProtocolsSection.cs