Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracker property is null in TrackingConfiguration<T> class #48

Closed
micahmo opened this issue Feb 18, 2021 · 2 comments
Closed

Tracker property is null in TrackingConfiguration<T> class #48

micahmo opened this issue Feb 18, 2021 · 2 comments

Comments

@micahmo
Copy link
Contributor

micahmo commented Feb 18, 2021

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;
@micahmo
Copy link
Contributor Author

micahmo commented Feb 18, 2021

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

Thanks!

@anakic
Copy link
Owner

anakic commented Feb 19, 2021

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

@anakic anakic closed this as completed in 853af5a Feb 19, 2021
anakic added a commit that referenced this issue Feb 19, 2021
Fix #48 - Provide access to Tracker property in TrackingConfiguration<T> class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants