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 / 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
- DupHandleConnectionReader.cs
- ControlBindingsCollection.cs
- DataControlReferenceCollection.cs
- RuntimeResourceSet.cs
- ZipIORawDataFileBlock.cs
- NetTcpBindingCollectionElement.cs
- ExclusiveCanonicalizationTransform.cs
- EditorZone.cs
- Identity.cs
- RoleGroup.cs
- LockCookie.cs
- _FtpDataStream.cs
- DbExpressionRules.cs
- ViewRendering.cs
- AuthorizationRuleCollection.cs
- GridViewCancelEditEventArgs.cs
- FormViewPageEventArgs.cs
- CorrelationInitializer.cs
- CdpEqualityComparer.cs
- FormsAuthentication.cs
- HistoryEventArgs.cs
- ScaleTransform.cs
- InvokeProviderWrapper.cs
- DataReceivedEventArgs.cs
- GridViewRow.cs
- TypeListConverter.cs
- Simplifier.cs
- TypeDelegator.cs
- CommonDialog.cs
- Ray3DHitTestResult.cs
- Rotation3DAnimationBase.cs
- MergeFilterQuery.cs
- StaticExtension.cs
- FloaterBaseParaClient.cs
- IntSecurity.cs
- UrlMappingsModule.cs
- ScalarOps.cs
- Pointer.cs
- SuppressIldasmAttribute.cs
- PagedControl.cs
- PermissionSetEnumerator.cs
- ScaleTransform3D.cs
- BindingSource.cs
- WindowsSecurityToken.cs
- XmlElement.cs
- TypedColumnHandler.cs
- FormParameter.cs
- MinMaxParagraphWidth.cs
- TypeValidationEventArgs.cs
- WpfSharedBamlSchemaContext.cs
- HyperLink.cs
- HtmlInputImage.cs
- HttpRawResponse.cs
- PropertyConverter.cs
- ReadWriteObjectLock.cs
- XmlSchemaAll.cs
- AspNetHostingPermission.cs
- ErrorBehavior.cs
- XmlSchemaNotation.cs
- ExpressionVisitor.cs
- FormViewCommandEventArgs.cs
- TagPrefixCollection.cs
- TreeViewDesigner.cs
- InternalReceiveMessage.cs
- DocComment.cs
- DoubleSumAggregationOperator.cs
- InvalidComObjectException.cs
- ResolvedKeyFrameEntry.cs
- TextBox.cs
- HandlerMappingMemo.cs
- OutputCacheProfileCollection.cs
- IList.cs
- HtmlTableRowCollection.cs
- EnvironmentPermission.cs
- Shared.cs
- SerializationSectionGroup.cs
- ExclusiveHandleList.cs
- HMACSHA512.cs
- ToolStripItemRenderEventArgs.cs
- FixedSOMPageConstructor.cs
- HtmlElement.cs
- XmlIterators.cs
- DoubleStorage.cs
- ImageDesigner.cs
- ClientBuildManager.cs
- CodeDefaultValueExpression.cs
- FormsAuthenticationUserCollection.cs
- CodeCatchClauseCollection.cs
- Section.cs
- MetadataSerializer.cs
- AutomationFocusChangedEventArgs.cs
- PageBuildProvider.cs
- FormViewDeleteEventArgs.cs
- CacheModeConverter.cs
- CommonDialog.cs
- HttpCapabilitiesSectionHandler.cs
- ConnectionsZone.cs
- DuplicateWaitObjectException.cs
- HelpFileFileNameEditor.cs
- UnmanagedHandle.cs