Example #1
0
 public AttributeResolverI()
 {
     try
     {
         Type cl = typeof(EndpointHelper);
         add("parent", cl.GetMethod("getParent"));
         add("id", cl.GetMethod("getId"));
         AttrsUtil.addEndpointAttributes <Metrics>(this, cl);
     }
     catch (Exception)
     {
         Debug.Assert(false);
     }
 }
Example #2
0
        addConnectionAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : IceMX.Metrics
        {
            Type cli = typeof(Ice.ConnectionInfo);

            r.add("incoming", cl.GetMethod("getConnectionInfo"), cli.GetField("incoming"));
            r.add("adapterName", cl.GetMethod("getConnectionInfo"), cli.GetField("adapterName"));
            r.add("connectionId", cl.GetMethod("getConnectionInfo"), cli.GetField("connectionId"));

            cli = typeof(Ice.IPConnectionInfo);
            r.add("localHost", cl.GetMethod("getConnectionInfo"), cli.GetField("localAddress"));
            r.add("localPort", cl.GetMethod("getConnectionInfo"), cli.GetField("localPort"));
            r.add("remoteHost", cl.GetMethod("getConnectionInfo"), cli.GetField("remoteAddress"));
            r.add("remotePort", cl.GetMethod("getConnectionInfo"), cli.GetField("remotePort"));

            cli = typeof(Ice.UDPConnectionInfo);
            r.add("mcastHost", cl.GetMethod("getConnectionInfo"), cli.GetField("mcastAddress"));
            r.add("mcastPort", cl.GetMethod("getConnectionInfo"), cli.GetField("mcastPort"));

            AttrsUtil.addEndpointAttributes <T>(r, cl);
        }