Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. public int CalculateSoundVolume(string roomName, int currentUser)
  2. {
  3.  
  4. {
  5.  
  6. //Business Logic
  7.  
  8. return finalApplauseVolume; //**say returning 75**
  9.  
  10. }
  11. catch (Exception ex)
  12. {
  13. _logger.LogException(ex);
  14. throw;
  15. }
  16. }
  17.  
  18. public IHttpActionResult CalculateSoundVolume()
  19. {
  20. try
  21. {
  22. //Some Logic
  23. var result = _applauseRepository.CalculateSoundVolume(huddleName, currentUser);
  24. return Ok(result); // **it returns 75 here in result**
  25. }
  26. catch (Exception ex)
  27. {
  28. _logger.LogException(ex);
  29. throw;
  30. }
  31. }
  32.  
  33. public calculateSoundVolume()
  34. {
  35. var promise = this.applauseService.calculateSoundVolume();
  36. promise.then((res) => {
  37. this.$log.debug("Sound Volume : ", res);
  38. // Getting Resource [0] : '7' and [1] : '5'
  39. });
  40. }
  41.  
  42. calculateSoundVolume()
  43. {
  44. return this.soundVolume.get().$promise;
  45. }
  46.  
  47. public JContainer CalculateSoundVolume()
  48. {
  49. try
  50. {
  51. //Some Logic
  52. var result = new JObject(new JProperty("soundVolume", _applauseRepository.CalculateSoundVolume(huddleName, currentUser)));
  53. return result;
  54. }
  55. catch (Exception ex)
  56. {
  57. _logger.LogException(ex);
  58. throw;
  59. }
  60. }
  61.  
  62. public calculateSoundVolume()
  63. {
  64. var promise = this.applauseService.calculateSoundVolume();
  65. promise.then((res) => {
  66. this.$log.debug("Sound Volume : ", res.soundVolume);
  67. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement