OperationCompletedEventArgs.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //-----------------------------------------------------------------------------
  2. // OperationCompletedEventArgs.cs
  3. //
  4. // Microsoft XNA Community Game Platform
  5. // Copyright (C) Microsoft Corporation. All rights reserved.
  6. //-----------------------------------------------------------------------------
  7. using System;
  8. namespace NetRumble
  9. {
  10. /// <summary>
  11. /// Custom EventArgs class used by the NetworkBusyScreen.OperationCompleted event.
  12. /// </summary>
  13. class OperationCompletedEventArgs : EventArgs
  14. {
  15. /// <summary>
  16. /// Gets or sets the result of the network operation that has just completed.
  17. /// </summary>
  18. public object Result { get; set; }
  19. /// <summary>
  20. /// Gets or sets the exception that caused the operation to fail, if any.
  21. /// </summary>
  22. public Exception Exception { get; set; }
  23. /// <summary>
  24. /// Constructs a new event arguments class.
  25. /// </summary>
  26. public OperationCompletedEventArgs(object result)
  27. {
  28. this.Result = result;
  29. }
  30. /// <summary>
  31. /// Constructs a new event arguments class with an optional exception.
  32. /// </summary>
  33. public OperationCompletedEventArgs(object result, Exception exception)
  34. {
  35. this.Result = result;
  36. this.Exception = exception;
  37. }
  38. }
  39. }