コード例 #1
0
 public MapAPIHTTPHandler_GET(MapAPIHandler mapapi, IRegistryCore reg, IHttpServer textureServer)
     : base("GET", httpPath)
 {
     m_mapapi        = mapapi;
     m_registry      = reg;
     m_textureServer = textureServer;
     MethodInfo[] methods = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
     for (uint i = 0; i < methods.Length; ++i)
     {
         if (methods[i].IsPrivate && typeof(OSD).IsAssignableFrom(methods[i].ReturnType) && methods[i].GetParameters().Length == 1 && methods[i].GetParameters()[0].ParameterType == typeof(string[]))
         {
             APIMethods[methods[i].Name] = methods[i];
         }
     }
 }
コード例 #2
0
 public MapAPIHTTPHandler_GET(MapAPIHandler mapapi, IRegistryCore reg, IHttpServer textureServer)
     : base("GET", httpPath)
 {
     m_mapapi = mapapi;
     m_registry = reg;
     m_textureServer = textureServer;
     MethodInfo[] methods = this.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
     for (uint i = 0; i < methods.Length; ++i)
     {
         if (methods[i].IsPrivate && typeof(OSD).IsAssignableFrom(methods[i].ReturnType) && methods[i].GetParameters().Length == 1 && methods[i].GetParameters()[0].ParameterType == typeof(string[]))
         {
             APIMethods[methods[i].Name] = methods[i];
         }
     }
 }