MpegTsPortabilityFactory.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.Generic;
  2. using System.Windows;
  3. using System.Windows.Threading;
  4. using MatrixIO.Collections;
  5. using MatrixIO.IO;
  6. namespace SLTest
  7. {
  8. internal class MpegTsPortabilityFactory : PortabilityFactory
  9. {
  10. #region List Creation
  11. public override IList<T> CreateList<T>()
  12. {
  13. return new DispatchingObservableList<T>();
  14. }
  15. public override IList<T> CreateList<T>(int capacity)
  16. {
  17. return new DispatchingObservableList<T>(capacity);
  18. }
  19. public override IList<T> CreateList<T>(IEnumerable<T> collection)
  20. {
  21. return new DispatchingObservableList<T>(collection);
  22. }
  23. #endregion
  24. private readonly Dispatcher _dispatcher = Deployment.Current.Dispatcher;
  25. public override void DispatchAction(System.Action action)
  26. {
  27. _dispatcher.BeginInvoke(action);
  28. }
  29. public override void TraceWriteLine(object value, string category = null)
  30. {
  31. }
  32. }
  33. }