示例#1
0
            public async void Initialize(IServiceProvider services)
            {
                _essentialsBuilder = new EssentialsBuilder();
                if (_essentialsRegistrations != null)
                {
                    foreach (var essentialsRegistration in _essentialsRegistrations)
                    {
                        essentialsRegistration.RegisterEssentialsOptions(_essentialsBuilder);
                    }
                }

#if WINDOWS
                Platform.MapServiceToken = _essentialsBuilder.MapServiceToken;
#endif

                AppActions.OnAppAction += HandleOnAppAction;

                try
                {
                    await AppActions.SetAsync(_essentialsBuilder.AppActions);
                }
                catch (FeatureNotSupportedException ex)
                {
                    services.GetService <ILoggerFactory>()?
                    .CreateLogger <IEssentialsBuilder>()?
                    .LogError(ex, "App Actions are not supported on this platform.");
                }

                if (_essentialsBuilder.TrackVersions)
                {
                    VersionTracking.Track();
                }
            }
示例#2
0
            public async void Configure(HostBuilderContext context, IServiceProvider services)
            {
#if WINDOWS
                Platform.MapServiceToken = _mapServiceToken;
#elif __ANDROID__
                SecureStorage.LegacyKeyHashFallback = _useLegaceSecureStorage;
#endif

                AppActions.OnAppAction += HandleOnAppAction;

                try
                {
                    await AppActions.SetAsync(_appActions);
                }
                catch (FeatureNotSupportedException ex)
                {
                    services.GetService <ILoggerFactory>()?
                    .CreateLogger <IEssentialsBuilder>()?
                    .LogError(ex, "App Actions are not supported on this platform.");
                }

                if (_trackVersions)
                {
                    VersionTracking.Track();
                }
            }
示例#3
0
            public async void Configure(HostBuilderContext context, IServiceProvider services)
            {
#if WINDOWS
                // Platform.MapServiceToken = _mapServiceToken;
#elif __ANDROID__
                SecureStorage.LegacyKeyHashFallback = _useLegaceSecureStorage;
#endif

                AppActions.OnAppAction += HandleOnAppAction;

                await AppActions.SetAsync(_appActions);

                if (_trackVersions)
                {
                    VersionTracking.Track();
                }
            }