2
0

IProgress.cs 513 B

123456789101112131415161718192021222324252627282930
  1. // defined from .NET Framework 4.5 and NETFX_CORE
  2. #if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0)
  3. using System;
  4. namespace UniRx
  5. {
  6. public interface IProgress<T>
  7. {
  8. void Report(T value);
  9. }
  10. public class Progress<T> : IProgress<T>
  11. {
  12. readonly Action<T> report;
  13. public Progress(Action<T> report)
  14. {
  15. this.report = report;
  16. }
  17. public void Report(T value)
  18. {
  19. report(value);
  20. }
  21. }
  22. }
  23. #endif