Ejemplo n.º 1
0
 /// <summary>
 /// Add a powerful Agent handler to 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 added. Any generated exceptions are
 /// allowed to drop through to the caller, i.e. ArgumentException.
 /// </returns>
 public bool AddAgentHandler(string agentName, IHttpAgentHandler handler)
 {
     if (!IsEnabled)
     {
         return(false);
     }
     _agents.Add(agentName, handler);
     return(_httpd.AddAgentHandler(agentName, handler));
 }