5 changed files
WPE.App.Analytics | ||
AnalyticsWrapper.cs + | ||
IAnalyticsWrapper.cs + | ||
ServiceCollectionExtensions.cs | ||
ReadMe.md | ||
version.props | ||
AnalyticsWrapper.cs
/WPE.App.Analytics/AnalyticsWrapper.cs+38/WPE.App.Analytics/AnalyticsWrapper.cs
Add comment 1 Plus namespace Infsoft.WPE.App.Analytics;
Add comment 2 Plus
Add comment 3 Plus /// <inheritdoc />
Add comment 4 Plus public class AnalyticsWrapper(IAnalyticsService analyticsService) : IAnalyticsWrapper
Add comment 5 Plus {
Add comment 6 Plus /// <inheritdoc />
Add comment 7 Plus public string IconOnlyText => "Icon only";
Add comment 8 Plus
Add comment 9 Plus /// <inheritdoc/>
Add comment 10 Plus public void TrackClick(
Add comment 11 Plus string name,
Add comment 12 Plus string text,
Add comment 13 Plus string location,
Add comment 14 Plus Action? action = null,
Add comment 15 Plus InteractionType interactionType = InteractionType.Button)
Add comment 16 Plus {
Add comment 17 Plus _ = analyticsService.OnClick(name, text, interactionType, location);
Add comment 18 Plus
Add comment 19 Plus action?.Invoke();
Add comment 20 Plus }
Add comment 21 Plus
Add comment 22 Plus /// <inheritdoc/>
Add comment 23 Plus public void TrackSearch(
Add comment 24 Plus int numberOfResults,
Add comment 25 Plus string searchLocation,
Add comment 26 Plus string? term = null,
Add comment 27 Plus Dictionary<string, List<string>>? filters = null,
Add comment 28 Plus (DateTime startDate, DateTime endDate)? timeParameter = null)
Add comment 29 Plus {
Add comment 30 Plus _ = analyticsService.OnSearch(
Add comment 31 Plus numberOfResults,
Add comment 32 Plus searchLocation,
Add comment 33 Plus term,
Add comment 34 Plus filters,
Add comment 35 Plus timeParameter?.startDate,
Add comment 36 Plus timeParameter?.endDate);
Add comment 37 Plus }
Add comment 38 Plus }
IAnalyticsWrapper.cs
/WPE.App.Analytics/IAnalyticsWrapper.cs/WPE.App.Analytics/IAnalyticsWrapper.cs
ServiceCollectionExtensions.cs
/WPE.App.Analytics/ServiceCollectionExtensions.cs/WPE.App.Analytics/ServiceCollectionExtensions.cs