public LatencyResponse ProcessLatency(LatencyRequest objRequest) { try { if (objRequest.LatencyType == null || objRequest.LatencyType == "DBInsertion") { objLatencyResponse.LatencyGrid = objclsDashboard.GetESB_Latency_DBInsertion(objRequest.DateTime); return(objLatencyResponse); } else { objLatencyResponse.LatencyGrid = objclsDashboard.GetLatencyData(objRequest.LatencyType, objRequest.DateTime); return(objLatencyResponse); } } catch (Exception) { return(objLatencyResponse); } finally { objLatencyResponse = null; objclsDashboard = null; } }