anakic/Jot

Tracker property is null in TrackingConfiguration<T> class

micahmo opened this issue · 2 comments

Hi,

I am excited to use this library in some of my projects. However, I have hit a stumbling block right out of the gate.

I was hoping to use a fluent style syntax to instantiate and configure my tracker. For the configuration, I've copied the example straight from the README. Unfortunately, it looks like the Tracker property of TrackingConfiguration<T> is never set properly. It is only available to the inner TrackingConfiguration.

Here is my code. The resulting tracker variable is null.

Tracker tracker = new Tracker().Configure<Window>()
    .Id(w => w.Name, SystemInformation.VirtualScreen.Size)
    .Properties(w => new { w.Top, w.Width, w.Height, w.Left, w.WindowState })
    .PersistOn(nameof(Window.Closing))
    .StopTrackingOn(nameof(Window.Closing))
    .Tracker;

I opened PR #49 as a potential fix for this issue.

Thanks!

Right you are. The generic wrapper did not populate/expose the Tracker property.