2
0

AsyncOp.cs 907 B

1234567891011121314151617181920212223242526
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup Utility
  8. * @{
  9. */
  10. public partial class AsyncOp
  11. {
  12. /// <summary>
  13. /// Retrieves the value returned by the async operation. Only valid if <see cref="IsCompleted"/> returns true.
  14. /// </summary>
  15. /// <typeparam name="T">Type of the return value. Caller must ensure to provide the valid type.</typeparam>
  16. /// <returns>Return value of the async operation.</returns>
  17. public T GetReturnValue<T>()
  18. {
  19. return (T)Internal_getReturnValue(mCachedPtr);
  20. }
  21. }
  22. /** @} */
  23. }