AsyncOpEx.generated.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /// <summary>
  7. /// Object you may use to check on the results of an asynchronous operation. Contains uninitialized data until IsComplete
  8. /// returns true.
  9. /// </summary>
  10. [ShowInInspector]
  11. public partial class AsyncOp : ScriptObject
  12. {
  13. private AsyncOp(bool __dummy0) { }
  14. protected AsyncOp() { }
  15. /// <summary>Returns true if the async operation has completed.</summary>
  16. [ShowInInspector]
  17. [NativeWrapper]
  18. public bool IsComplete
  19. {
  20. get { return Internal_isComplete(mCachedPtr); }
  21. }
  22. /// <summary>Retrieves the value returned by the async operation. Only valid if IsComplete returns true.</summary>
  23. [ShowInInspector]
  24. [NativeWrapper]
  25. public object ReturnValue
  26. {
  27. get { return Internal_getReturnValue(mCachedPtr); }
  28. }
  29. /// <summary>Blocks the caller thread until the AsyncOp completes.</summary>
  30. public void BlockUntilComplete()
  31. {
  32. Internal_blockUntilComplete(mCachedPtr);
  33. }
  34. [MethodImpl(MethodImplOptions.InternalCall)]
  35. private static extern bool Internal_isComplete(IntPtr thisPtr);
  36. [MethodImpl(MethodImplOptions.InternalCall)]
  37. private static extern object Internal_getReturnValue(IntPtr thisPtr);
  38. [MethodImpl(MethodImplOptions.InternalCall)]
  39. private static extern void Internal_blockUntilComplete(IntPtr thisPtr);
  40. }
  41. }