public WebAPIHandler()
{
m_APIMethods[WebAPIHttpMethod.GET] = new Dictionary<string,MethodInfo>();
m_APIMethods[WebAPIHttpMethod.POST] = new Dictionary<string,MethodInfo>();
MethodInfo[] methods = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
for (uint i = 0; i < methods.Length; ++i)
{
WebAPIMethod attr = (WebAPIMethod)Attribute.GetCustomAttribute(methods[i], typeof(WebAPIMethod));
if (attr != null && methods[i].ReturnType == typeof(OSDMap) && methods[i].GetParameters().Length >= 1 && methods[i].GetParameters()[0].ParameterType == typeof(OSDMap))
{
if ((!attr.PassOnRequestingAgentID && methods[i].GetParameters().Length == 1) || (attr.PassOnRequestingAgentID && methods[i].GetParameters().Length == 2))
{
m_APIMethods[attr.HttpMethod][methods[i].Name] = methods[i];
}
}
}
}