AsyncOpEx.generated.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. public partial class AsyncOp : ScriptObject
  11. {
  12. private AsyncOp(bool __dummy0) { }
  13. protected AsyncOp() { }
  14. /// <summary>Returns true if the async operation has completed.</summary>
  15. public bool IsComplete
  16. {
  17. get { return Internal_isComplete(mCachedPtr); }
  18. }
  19. /// <summary>Retrieves the value returned by the async operation. Only valid if IsComplete returns true.</summary>
  20. public object ReturnValue
  21. {
  22. get { return Internal_getReturnValue(mCachedPtr); }
  23. }
  24. /// <summary>Blocks the caller thread until the AsyncOp completes.</summary>
  25. public void BlockUntilComplete()
  26. {
  27. Internal_blockUntilComplete(mCachedPtr);
  28. }
  29. [MethodImpl(MethodImplOptions.InternalCall)]
  30. private static extern bool Internal_isComplete(IntPtr thisPtr);
  31. [MethodImpl(MethodImplOptions.InternalCall)]
  32. private static extern object Internal_getReturnValue(IntPtr thisPtr);
  33. [MethodImpl(MethodImplOptions.InternalCall)]
  34. private static extern void Internal_blockUntilComplete(IntPtr thisPtr);
  35. }
  36. }