AddEndpointAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : Metrics { r.Add("endpoint", cl.GetMethod("GetEndpoint") !); Type cli = typeof(Endpoint); r.Add("endpointType", cl.GetMethod("GetEndpoint") !, cli.GetProperty("Type") !); r.Add("endpointIsDatagram", cl.GetMethod("GetEndpoint") !, cli.GetProperty("IsDatagram") !); r.Add("endpointIsSecure", cl.GetMethod("GetEndpoint") !, cli.GetProperty("IsSecure") !); r.Add("endpointTimeout", cl.GetMethod("GetEndpoint") !, cli.GetProperty("Timeout") !); r.Add("endpointCompress", cl.GetMethod("GetEndpoint") !, cli.GetProperty("HasCompressionFlag") !); cli = typeof(IPEndpoint); r.Add("endpointHost", cl.GetMethod("GetEndpoint") !, cli.GetField("Host") !); r.Add("endpointPort", cl.GetMethod("GetEndpoint") !, cli.GetField("Port") !); }
AddEndpointAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : IceMX.Metrics { r.Add("endpoint", cl.GetMethod("GetEndpoint")); Type cli = typeof(Ice.EndpointInfo); r.Add("endpointType", cl.GetMethod("GetEndpointInfo"), cli.GetMethod("Type")); r.Add("endpointIsDatagram", cl.GetMethod("GetEndpointInfo"), cli.GetMethod("Datagram")); r.Add("endpointIsSecure", cl.GetMethod("GetEndpointInfo"), cli.GetMethod("Secure")); r.Add("endpointTimeout", cl.GetMethod("GetEndpointInfo"), cli.GetField("Timeout")); r.Add("endpointCompress", cl.GetMethod("GetEndpointInfo"), cli.GetField("Compress")); cli = typeof(Ice.IPEndpointInfo); r.Add("endpointHost", cl.GetMethod("GetEndpointInfo"), cli.GetField("Host")); r.Add("endpointPort", cl.GetMethod("GetEndpointInfo"), cli.GetField("Port")); }
AddConnectionAttributes <T>(MetricsHelper <T> .AttributeResolver r, Type cl) where T : Metrics { Type cli = typeof(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(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(UDPConnectionInfo); r.Add("mcastHost", cl.GetMethod("GetConnectionInfo") !, cli.GetField("McastAddress") !); r.Add("mcastPort", cl.GetMethod("GetConnectionInfo") !, cli.GetField("McastPort") !); AddEndpointAttributes(r, cl); }