HttpModuleActionCollection.Add(HttpModuleAction) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Ajoute un HttpModuleAction objet à la collection.
public:
void Add(System::Web::Configuration::HttpModuleAction ^ httpModule);
public void Add(System.Web.Configuration.HttpModuleAction httpModule);
member this.Add : System.Web.Configuration.HttpModuleAction -> unit
Public Sub Add (httpModule As HttpModuleAction)
Paramètres
- httpModule
- HttpModuleAction
Module HttpModuleAction à ajouter à la collection.
Exceptions
Une tentative a été effectuée pour ajouter un HttpModuleAction objet qui existe déjà dans la collection.
Exemples
L’exemple suivant montre comment créer un HttpModuleAction objet et l’ajouter à la collection.
// Create a new module object.
HttpModuleAction ModuleAction =
new HttpModuleAction("MyModuleName",
"MyModuleType");
// Add the module to the collection.
if (!httpModulesSection.SectionInformation.IsLocked)
{
modulesCollection.Add(ModuleAction);
configuration.Save();
}
' Create a new module object.
Dim ModuleAction As New HttpModuleAction( _
"MyModuleName", "MyModuleType")
' Add the module to the collection.
If Not httpModulesSection.SectionInformation.IsLocked Then
modulesCollection.Add(ModuleAction)
configuration.Save()
End If
Remarques
Ajoute un HttpModuleAction objet à la collection.