HttpModulesSection.Modules Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft die HttpModuleActionCollection Module HttpModuleAction ab, die in der HttpModulesSection.
public:
property System::Web::Configuration::HttpModuleActionCollection ^ Modules { System::Web::Configuration::HttpModuleActionCollection ^ get(); };
[System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)]
public System.Web.Configuration.HttpModuleActionCollection Modules { get; }
[<System.Configuration.ConfigurationProperty("", IsDefaultCollection=true)>]
member this.Modules : System.Web.Configuration.HttpModuleActionCollection
Public ReadOnly Property Modules As HttpModuleActionCollection
Eigenschaftswert
Eine HttpModuleActionCollection , die die HttpModuleAction objekte oder Module enthält, die durch die HttpModulesSection.
- Attribute
Beispiele
Das folgende Codebeispiel zeigt, wie Sie auf die HttpModuleAction Module zugreifen.
// Get the modules collection.
HttpModuleActionCollection httpModules = httpModulesSection.Modules;
// Read the modules information.
StringBuilder modulesInfo = new StringBuilder();
for (int i = 0; i < httpModules.Count; i++)
{
modulesInfo.Append(
string.Format("Name: {0}\nType: {1}\n\n", httpModules[i].Name,
httpModules[i].Type));
}
' Get the modules collection.
Dim httpModules As HttpModuleActionCollection = httpModulesSection.Modules
' Read the modules information.
Dim modulesInfo As New StringBuilder()
For i As Integer = 0 To httpModules.Count - 1
modulesInfo.Append(String.Format("Name: {0}" + vbLf + "Type: {1}" + vbLf + vbLf, httpModules(i).Name, httpModules(i).Type))
Next
Hinweise
Die von dieser Methode zurückgegebene Auflistung verweist nicht auf ein tatsächliches Element in der zugrunde liegenden Konfigurationsdatei. Es handelt sich um ein ASP.NET Infrastrukturkonstrukt, das einfachen Zugriff auf die darin enthaltenen Module ermöglicht. Dies ist ein gängiges Muster für die Behandlung der Elemente einer Konfigurationsdatei.