< Summary

Class:DCL.PortableExperiences.Confirmation.ExperiencesConfirmationPlugin
Assembly:ExperienciesConfirmation
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ExperiencesConfirmation/ExperiencesConfirmationPlugin.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:41
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:3
Method coverage:0% (0 of 3)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ExperiencesConfirmationPlugin()0%2100%
Initialize()0%12300%
Dispose()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ExperiencesConfirmation/ExperiencesConfirmationPlugin.cs

#LineLine coverage
 1using Cysharp.Threading.Tasks;
 2using DCL.Helpers;
 3using DCL.Providers;
 4using DCL.World.PortableExperiences;
 5using DCLServices.PortableExperiences.Analytics;
 6using System.Threading;
 7
 8namespace DCL.PortableExperiences.Confirmation
 9{
 10    public class ExperiencesConfirmationPlugin : IPlugin
 11    {
 012        private readonly CancellationTokenSource pluginCancellationToken = new ();
 13        private ExperiencesConfirmationPopupController popupController;
 14
 015        public ExperiencesConfirmationPlugin()
 16        {
 017            Initialize(pluginCancellationToken.Token).Forget();
 018        }
 19
 20        private async UniTaskVoid Initialize(CancellationToken cancellationToken)
 21        {
 022            var view = await Environment.i.serviceLocator
 23                                        .Get<IAddressableResourceProvider>()
 24                                        .Instantiate<ExperiencesConfirmationPopupComponentView>("ExperiencesConfirmation
 25                                             "ExperiencesConfirmationPopup", cancellationToken: cancellationToken);
 26
 027            popupController = new ExperiencesConfirmationPopupController(view,
 28                DataStore.i,
 29                new PlayerPrefsConfirmedExperiencesRepository(new DefaultPlayerPrefs()),
 30                new UserProfileWebInterfaceBridge(),
 31                Environment.i.serviceLocator.Get<IPortableExperiencesAnalyticsService>());
 032        }
 33
 34        public void Dispose()
 35        {
 036            popupController.Dispose();
 037            pluginCancellationToken.Cancel();
 038            pluginCancellationToken.Dispose();
 039        }
 40    }
 41}