PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/Labs/Microsoft.Activities.Extensions/Microsoft.Activities.Extensions.Tests/StateTrackerObserver.cs

#
C# | 71 lines | 3 code | 12 blank | 56 comment | 0 complexity | bbc5dfbf208928285852cc70e616697b MD5 | raw file
  1. namespace Microsoft.Activities.Extensions.Tests
  2. {
  3. //using System;
  4. //using System.Collections.ObjectModel;
  5. //using System.ComponentModel;
  6. //using System.Diagnostics.Contracts;
  7. //using Microsoft.Activities.Extensions.Tracking;
  8. //using Microsoft.Activities.Extensions.Windows;
  9. ///// <summary>
  10. ///// Observes change notifications from a StateTracker
  11. ///// </summary>
  12. //public class StateTrackerObserver
  13. //{
  14. // #region Fields
  15. // /// <summary>
  16. // /// The property changed notifications
  17. // /// </summary>
  18. // private readonly Collection<PropertyChangedEventArgs> propertyChangedArgs =
  19. // new Collection<PropertyChangedEventArgs>();
  20. // #endregion
  21. // #region Constructors and Destructors
  22. // /// <summary>
  23. // /// Initializes a new instance
  24. // /// </summary>
  25. // /// <param name="tracker">The tracker</param>
  26. // public StateTrackerObserver(ObservableStateTracker tracker)
  27. // {
  28. // Contract.Requires(tracker != null);
  29. // if (tracker == null)
  30. // {
  31. // throw new ArgumentNullException("tracker");
  32. // }
  33. // tracker.PropertyChanged += (sender, args) => this.propertyChangedArgs.Add(args);
  34. // }
  35. // #endregion
  36. // #region Public Properties
  37. // /// <summary>
  38. // /// Gets the PropertyChangedArgs
  39. // /// </summary>
  40. // public ReadOnlyCollection<PropertyChangedEventArgs> PropertyChangedArgs
  41. // {
  42. // get
  43. // {
  44. // return new ReadOnlyCollection<PropertyChangedEventArgs>(this.propertyChangedArgs);
  45. // }
  46. // }
  47. // #endregion
  48. // /// <summary>
  49. // /// Outputs a trace of the observer
  50. // /// </summary>
  51. // public void Trace()
  52. // {
  53. // var tsb = new TraceStringBuilder() { Options = TraceOptions.ShowCollectionCount };
  54. // tsb.AppendLine(this.GetType().FullName);
  55. // tsb.AppendCollection("PropertyChangedArgs", this.PropertyChangedArgs, (args, i) => args.PropertyName);
  56. // WorkflowTrace.Information(tsb.ToString());
  57. // }
  58. //}
  59. }