Esempio n. 1
0
 /// <summary>
 /// Remove a powerful Agent handler from the underlying HTTP
 /// server.
 /// </summary>
 /// <param name="agentName">name of agent handler</param>
 /// <param name="handler">agent handler method</param>
 /// <returns>false when the plugin is disabled or the agent
 /// handler could not be removed. Any generated exceptions are
 /// allowed to drop through to the caller, i.e. KeyNotFound.
 /// </returns>
 public bool RemoveAgentHandler(string agentName, IHttpAgentHandler handler)
 {
     if (!IsEnabled)
     {
         return(false);
     }
     if (_agents[agentName] == handler)
     {
         _agents.Remove(agentName);
         return(_httpd.RemoveAgentHandler(agentName, handler));
     }
     return(false);
 }