Пример #1
0
        public MenuViewModel(
            Func <Type, string, object, MenuItemViewModel> factory,
            INavigationService navigationService,
            IPlatformService platformService,
            ISettingManager settingManager)
        {
            _navigationService = navigationService;
            _platformService   = platformService;
            _settingManager    = settingManager;
            _factory           = factory;

            Items = new ReactiveList <MenuItemViewModel>();
            _navigationService.Navigated
            .Where(type => type != Selection?.Type)
            .Select(x => Items.FirstOrDefault(i => i.Type == x))
            .Subscribe(x => Selection = x);

            this.WhenAnyValue(x => x.Selection)
            .Where(selection => selection != null)
            .Select(selection => selection.Type)
            .Where(type => type != _navigationService.CurrentViewModelType)
            .Subscribe(viewModelType => typeof(INavigationService)
                       .GetMethod(nameof(INavigationService.Navigate), new Type[0])?
                       .MakeGenericMethod(viewModelType)
                       .Invoke(_navigationService, null));

            Activator = new ViewModelActivator();
            this.WhenActivated(async disposables => await Activate(disposables));
        }
Пример #2
0
        public JobboardViewModel(IPlatformService platformService, IBookingService bookingService) : base(platformService)
        {
            _bookingService = bookingService;

            ItemSelectedCommand = new MvxCommand <BookingsItemViewModel>(ItemSelected);
            BookingCommand      = new MvxCommand(ShowBooking);
        }
Пример #3
0
        public ChannelItemViewModel(
            ICategoryManager categoryManager,
            IPlatformService platformService,
            IMessageBus messageBus,
            Channel channel)
        {
            _categoryManager = categoryManager;
            _platformService = platformService;
            _messageBus      = messageBus;
            _channel         = channel;

            Notify = _channel.Notify;
            this.WhenAnyValue(x => x.Notify).Skip(1)
            .Do(notify => _channel.Notify = notify)
            .Select(notify => channel)
            .SelectMany(_categoryManager.Update)
            .Subscribe();

            DeleteRequest = new Interaction <Unit, bool>();
            Delete        = ReactiveCommand.CreateFromTask(DoDelete);
            Copy          = ReactiveCommand.CreateFromTask(
                () => _platformService.CopyTextToClipboard(Url)
                );

            Open = ReactiveCommand.CreateFromTask(DoOpen,
                                                  this.WhenAnyValue(x => x.Url).Select(x => Uri
                                                                                       .IsWellFormedUriString(x, UriKind.Absolute)));
        }
Пример #4
0
        public FirstViewModel(
            INavigationService navigationService,
            ILogger logger,
            ITestRepository testRepository,
            IPlatformService platformService,
            IMessagingService messagingService,
            IConnectivityHelper connectivityHelper,
            IDialogService dialogService,
            IAppAnalyticsProvider appAnalyticProvider) : base(navigationService, logger)
        {
            _testRepository       = testRepository;
            _platformService      = platformService;
            _messagingService     = messagingService;
            _connectivityHelper   = connectivityHelper;
            _dialogService        = dialogService;
            _appAnalyticsProvider = appAnalyticProvider;

            OkCancelAlertResponse = false;
            OSVersion             = $"{_platformService.OsVersion.Major}.{_platformService.OsVersion.Minor}.{_platformService.OsVersion.Build}";
            IsConnected           = connectivityHelper.IsConnected;
            logger.Verbose("First ViewModel", null, new[] { LoggerConstants.UiAction });
            logger.Verbose("OS Version", new { OSVersion }, new[] { LoggerConstants.UiAction });
            ShowDialog           = new Command(DisplayProgressDialog);
            DisplayCancelAlert   = new Command(DisplayAlertWithCancleButton);
            DisplayOkCancelAlert = new Command(DisplayAlertWithOkCancleButton);
            ShowModalPopupDialog = new Command(ShowModalPopup);
            CrashAppCommand      = new Command(() => { throw new Exception("Test Exception to crash app"); });
        }
Пример #5
0
        /// <summary>
        /// It Takes an instance of IWebPlatform(ehich extends IPlatformService ) and Action payload and call the required functions for execution.
        /// Supported actions are Browser Action and Ui Element action with Page object Model Support
        ///
        /// </summary>
        /// <param name="service"></param>
        /// <param name="platformAction"></param>
        /// <returns></returns>
        public void HandleRunAction(IPlatformService service, ref NodePlatformAction platformAction)
        {
            // add try catch !!!!!!!!!!


            IWebPlatform webPlatformService = (IWebPlatform)service;



            switch (platformAction.ActionType)
            {
            case "BrowserAction":
                //TODO: cache
                BrowserActionhandler Handler = new BrowserActionhandler(webPlatformService);
                Handler.ExecuteAction(ref platformAction);
                break;

            case "UIElementAction":

                UIELementActionHandler Handler2 = new UIELementActionHandler(webPlatformService);
                Handler2.ExecuteAction(ref platformAction);
                break;

            case "SmartSyncAction":

                ExecuteSmartSyncAction(webPlatformService, ref platformAction);

                break;

            default:
                platformAction.error += "HandleRunAction: handler not found: ";
                break;
            }
        }
Пример #6
0
 protected XamarinFormsBootstrapperBase(IPlatformService platformService, bool isDesignMode = false)
     : this(isDesignMode, platformService?.GetPlatformInfo())
 {
     Should.NotBeNull(platformService, nameof(platformService));
     _platformService     = platformService;
     WrapToNavigationPage = true;
 }
Пример #7
0
        private static PlatformInfo GetPlatformInfo()
        {
            Assembly assembly = TryLoadAssembly(BindingAssemblyName, null);

            if (assembly == null)
            {
                if (Device.OS == TargetPlatform.WinPhone)
                {
                    assembly = TryLoadAssembly(WinRTAssemblyName, null);
                }
                if (assembly == null)
                {
                    return(XamarinFormsExtensions.GetPlatformInfo());
                }
            }
            TypeInfo serviceType = typeof(IPlatformService).GetTypeInfo();

            serviceType = assembly.DefinedTypes.FirstOrDefault(serviceType.IsAssignableFrom);
            if (serviceType != null)
            {
                _platformService = (IPlatformService)Activator.CreateInstance(serviceType.AsType());

                BindingServiceProvider.ValueConverter = _platformService.ValueConverter;
            }
            return(_platformService == null
                ? XamarinFormsExtensions.GetPlatformInfo()
                : _platformService.GetPlatformInfo());
        }
        public void HandleRunAction(IPlatformService service, ref NodePlatformAction platformAction)
        {
            Platformservice = (IWebServicePlatform)service;

            RestClient = Platformservice.RestClient;

            try
            {
                GingerHttpRequestMessage Request = GetRequest(platformAction);

                GingerHttpResponseMessage Response = RestClient.PerformHttpOperation(Request);
                platformAction.Output.Add("Header: Status Code ", Response.StatusCode.ToString());

                foreach (var RespHeader in Response.Headers)
                {
                    platformAction.Output.Add("Header: " + RespHeader.Key, RespHeader.Value);
                }

                platformAction.Output.Add("Request:", Response.RequestBodyString);
                platformAction.Output.Add("Response:", Response.Resposne);
            }

            catch (Exception ex)
            {
                platformAction.addError(ex.Message);
            }
        }
 public LocalDataProtectionProvider(
     IProtectedData protectedData,
     IDataProtectionProvider dataProtectionProvider,
     IPlatformService platformService) : base(protectedData, dataProtectionProvider)
 {
     this.platformService = platformService;
 }
Пример #10
0
 public TransactionServiceFactory(IProcessSettingsFactory settingsFactory, ITransactionDataConnector dataConnector, IAgentFactory agentFactory, IAlternateBranchFactory alternateBranchFactory,
                                  ITransactionFeeListFactory transactionFeeListFactory, ITransactionContextFactory transactionContextFactory, ICustomerFactory customerFactory, ITransactionDeficienciesFactory transactionDeficienciesFactory,
                                  IDocumentService documentService, ILogicEvaluatorTypeFactory evaluatorTypeFactory, IEvidenceService evidenceService, ILocationFactory locationFactory,
                                  IParameterSerializer parameterSerializer, IPlatformService platformService, IProcessStepFactory processStepFactory, IProcessStepTypeFactory processStepTypeFactory,
                                  IRequirementEvaluator requirementEvaluator, IRequirementFactory requirementFactory, ITransactionHistoryFactory transactionHistoryFactory,
                                  ITransactionProcessFactory transactionProcessFactory, IFeeList feeList)
 {
     this.SettingsFactory                = settingsFactory ?? throw new ArgumentNullException("settingsFactory");
     this.DataConnector                  = dataConnector ?? throw new ArgumentNullException("dataConnector");
     this.AgentFactory                   = agentFactory ?? throw new ArgumentNullException("agentFactory.");
     this.AlternateBranchFactory         = alternateBranchFactory ?? throw new ArgumentNullException("alternateBrachFactory");
     this.TransactionFeeListFactory      = transactionFeeListFactory ?? throw new ArgumentNullException("transactionFeeListFactory");
     this.TransactionContextFactory      = transactionContextFactory ?? throw new ArgumentNullException("transactionContextFactory");
     this.CustomerFactory                = customerFactory ?? throw new ArgumentNullException("customerFactory.");
     this.TransactionDeficienciesFactory = transactionDeficienciesFactory ?? throw new ArgumentNullException("transactionDeficienciesFactory");
     this.DocumentService                = documentService ?? throw new ArgumentNullException("documentService");
     this.EvaluatorTypeFactory           = evaluatorTypeFactory ?? throw new ArgumentNullException("evaluatorTypeFactory.");
     this.EvidenceService                = evidenceService ?? throw new ArgumentNullException("evidenceService");
     this.LocationFactory                = locationFactory ?? throw new ArgumentNullException("locationFactory.");
     this.PlatformService                = platformService ?? throw new ArgumentNullException("platformService.");
     this.ProcessStepFactory             = processStepFactory ?? throw new ArgumentNullException("processStepFactory.");
     this.ProcessStepTypeFactory         = processStepTypeFactory ?? throw new ArgumentNullException("processStepTypeFactory.");
     this.RequirementEvaluator           = requirementEvaluator ?? throw new ArgumentNullException("requirementEvaluator");
     this.RequirementFactory             = requirementFactory ?? throw new ArgumentNullException("requirementFactory.");
     this.TransactionHistoryFactory      = transactionHistoryFactory ?? throw new ArgumentNullException("transactionHistoryFactory");
     this.TransactionProcessFactory      = transactionProcessFactory ?? throw new ArgumentNullException("transactionProcessFactory.");
     this.ParameterSerializer            = parameterSerializer ?? throw new ArgumentNullException("parameterSerializer");
     this.FeeList = feeList ?? throw new ArgumentNullException("feeList");
 }
Пример #11
0
        public SearchItemViewModel(
            ICategoryManager categoryManager,
            IPlatformService platformService,
            FeedlyItem feedlyItem)
        {
            _categoryManager = categoryManager;
            _platformService = platformService;
            _feedlyItem      = feedlyItem;

            Select = new Interaction <IList <string>, int>();
            Add    = ReactiveCommand.CreateFromTask(DoAdd, Observable
                                                    .Return(feedlyItem.FeedId?.Substring(5))
                                                    .Select(x => Uri.IsWellFormedUriString(x, UriKind.Absolute)));

            Error = new Interaction <Exception, bool>();
            Add.ThrownExceptions
            .ObserveOn(RxApp.MainThreadScheduler)
            .Subscribe(error => Error.Handle(error));

            Open = ReactiveCommand.CreateFromTask(
                () => _platformService.LaunchUri(new Uri(Url)),
                Observable.Return(Uri.IsWellFormedUriString(Url, UriKind.Absolute))
                );
            Copy = ReactiveCommand.CreateFromTask(
                () => _platformService.CopyTextToClipboard(Url),
                Observable.Return(!string.IsNullOrWhiteSpace(Url))
                );
        }
Пример #12
0
        public StartupManager(IWorkbook workbook, IPlatformService platformService, IMessageBoxService messageBoxService, INotificationService notificationService, ITrackingManager trackingManager)
        {
            if (workbook == null)
            {
                throw new ArgumentNullException(nameof(workbook));
            }
            if (platformService == null)
            {
                throw new ArgumentNullException(nameof(platformService));
            }
            if (messageBoxService == null)
            {
                throw new ArgumentNullException(nameof(messageBoxService));
            }
            if (notificationService == null)
            {
                throw new ArgumentNullException(nameof(notificationService));
            }
            if (trackingManager == null)
            {
                throw new ArgumentNullException(nameof(trackingManager));
            }

            this.workbook            = workbook;
            this.platformService     = platformService;
            this.settings            = workbook.Settings;
            this.messageBoxService   = messageBoxService;
            this.notificationService = notificationService;
            this.trackingManager     = trackingManager;

            this.startTime = DateTime.UtcNow;
        }
Пример #13
0
 public ResourceOpeningService(
     IProcessService processService,
     IPlatformService platformService)
 {
     _processService  = processService;
     _platformService = platformService;
 }
Пример #14
0
        public SettingsViewModel(
            ITranslationsService translationsService,
            IFilePickerService filePickerService,
            IPackagingService packagingService,
            ISettingsService settingsService,
            IPlatformService platformService,
            IDialogService dialogService,
            IOpmlService opmlService)
        {
            Theme   = string.Empty;
            Version = packagingService.Version;
            (LoadImages, NeedBanners) = (true, true);
            (FontSize, NotifyPeriod, MaxArticlesPerFeed) = (0, 0, 0);
            LeaveFeedback = new ObservableCommand(packagingService.LeaveFeedback);
            LeaveReview   = new ObservableCommand(packagingService.LeaveReview);
            ImportOpml    = new ObservableCommand(async() =>
            {
                var stream = await filePickerService.PickFileForReadAsync();
                await opmlService.ImportOpmlFeedsAsync(stream);
            });
            ExportOpml = new ObservableCommand(async() =>
            {
                var stream = await filePickerService.PickFileForWriteAsync();
                await opmlService.ExportOpmlFeedsAsync(stream);
            });
            Reset = new ObservableCommand(async() =>
            {
                var response = await dialogService.ShowDialogForConfirmation(
                    translationsService.Resolve("ResetAppNoRestore"),
                    translationsService.Resolve("Notification"));
                if (response)
                {
                    await platformService.ResetApp();
                }
            });
            Load = new ObservableCommand(async() =>
            {
                await Task.WhenAll(
                    StartTracking(NotifyPeriod, "NotifyPeriod", platformService.RegisterBackgroundTask),
                    StartTracking(MaxArticlesPerFeed, "MaxArticlesPerFeed", o => Task.CompletedTask),
                    StartTracking(NeedBanners, "NeedBanners", o => Task.CompletedTask),
                    StartTracking(LoadImages, "LoadImages", o => Task.CompletedTask),
                    StartTracking(FontSize, "FontSize", o => Task.CompletedTask),
                    StartTracking(Theme, "Theme", platformService.RegisterTheme)
                    );
            });
            async Task StartTracking <T>(ObservableProperty <T> property, string key,
                                         Func <T, Task> callback) where T : IConvertible
            {
                property.Value = await settingsService.GetAsync <T>(key);

                property.PropertyChanged += async(o, args) =>
                {
                    var value = property.Value;
                    await callback.Invoke(value);

                    await settingsService.SetAsync(key, value);
                };
            }
        }
        protected MentionViewModelBase(IPlatformService platformService, IUserService userService) : base(platformService)
        {
            _userService = userService;
            MentionUsers = new List <MentionUser>();

            MentionCommand = new MvxAsyncCommand(Mention);
        }
Пример #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceManager"/> class.
 /// </summary>
 /// <param name="rmtSession">Remote session</param>
 public ResourceManager(RemoteSession rmtSession)
 {
     this.remoteSession = rmtSession;
     this.highPriorityDownloadManager = new ResourceDownloadManager(this.remoteSession);
     this.lowPriorityDownloadManager  = new ResourceDownloadManager(this.remoteSession);
     this.platformService             = SimpleIoc.Default.GetInstance <IPlatformService>();
 }
 public RegistrationViewModel(IMemberHandler memberHandler, IPlatformService platformService)
 {
     _memberHandler   = memberHandler;
     _platformService = platformService;
     RollNo           = " ";
     PhoneNo          = "+88";
 }
Пример #18
0
        public ChannelViewModel(
            IPlatformService platformService,
            ICategoriesRepository categoriesRepository,
            ChannelCategoryViewModel parentViewModel,
            Channel channel)
        {
            Url    = channel.Uri;
            Notify = channel.Notify;
            Name   = new Uri(channel.Uri).Host;

            CopyLink      = new ObservableCommand(() => platformService.CopyTextToClipboard(channel.Uri));
            OpenInBrowser = new ObservableCommand(async() =>
            {
                if (!Uri.IsWellFormedUriString(channel.Uri, UriKind.Absolute))
                {
                    return;
                }
                var uri      = new Uri(channel.Uri);
                var plainUri = new Uri(string.Format("{0}://{1}", uri.Scheme, uri.Host));
                await platformService.LaunchUri(plainUri);
            });
            DeleteSource = new ObservableCommand(async() =>
            {
                parentViewModel.Items.Remove(this);
                await categoriesRepository.RemoveChannelAsync(
                    parentViewModel.Category.Value, channel);
            });
            Notify.PropertyChanged += async(sender, args) =>
            {
                channel.Notify = Notify.Value;
                await categoriesRepository.UpdateAsync(
                    parentViewModel.Category.Value);
            };
        }
Пример #19
0
 protected XamarinFormsBootstrapperBase(IPlatformService platformService)
 {
     Should.NotBeNull(platformService, nameof(platformService));
     _platformService = platformService;
     _platform        = platformService.GetPlatformInfo();
     BindingServiceProvider.ValueConverter = platformService.ValueConverter;
 }
Пример #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="App"/> class.
 /// </summary>
 /// <param name="landingAreaService">The landing area service.</param>
 /// <param name="platformService">The platform service.</param>
 /// <param name="rocketService">The rocket service.</param>
 public App(ILandingAreaService landingAreaService, IPlatformService platformService, IRocketService rocketService, IPositionService positionService)
 {
     _landingAreaService = landingAreaService;
     _platformService    = platformService;
     _rocketService      = rocketService;
     _positionService    = positionService;
 }
Пример #21
0
        public TeamRegisterViewModel(INavigation navigation, IRequestService requestService, int teamId)
        {
            _teamId         = teamId;
            _navigation     = navigation;
            _requestService = requestService;
            if (AppSettings.ApiStatus)
            {
                _gameService     = new GameService(requestService);
                _platformService = new PlatformService(requestService);
                _teamService     = new TeamService(requestService);
                _imageService    = new ImageService(requestService);
            }
            else
            {
                _gameService     = new FakeGameService();
                _platformService = new FakePlatformService();
                _teamService     = new FakeTeamService();
                _imageService    = new ImageService(new RequestService());
            }
            Games      = new ObservableCollection <Game>();
            Platforms  = new ObservableCollection <Platform>();
            IconSource = "http://liquipedia.net/commons/images/thumb/1/1d/Immortals_org.png/600px-Immortals_org.png";

            Task.Run(async() =>
            {
                await LoadGames();
                await LoadTeam();
            });
        }
Пример #22
0
 public void Setup()
 {
     _platformService    = A.Fake <IPlatformService>();
     _logger             = A.Fake <ILogger <PlatformController> >();
     _mapper             = A.Fake <IMapper>();
     _platformController = new PlatformController(_platformService, _logger, _mapper);
 }
Пример #23
0
		private SlideshowDriver(SlideshowModel model, ISlideshowViewer viewer, IPlatformService platformService)
		{
			PlatformService = platformService;
			Model = model;
			Viewer = viewer;
			State = DriverState.Created;
		}
Пример #24
0
        public AccessControlViewModel(IPlatformService platformService, IApiService <IIntegrationApi> apiService) : base(platformService)
        {
            _apiService = apiService;

            ItemSelected   = new MvxCommand <AccessControlItemViewModel>(SelectItem);
            RefreshCommand = new MvxAsyncCommand(RefreshAsync);
        }
 internal SessionTelemetryModule(IPlatformService platform, IClock clock)
 {
     Debug.Assert(platform != null, "platform");
     Debug.Assert(clock != null, "clock");
     this.platform = platform;
     this.clock    = clock;
 }
Пример #26
0
        public ChannelItemViewModel(
            ChannelGroupViewModel channelGroup,
            ICategoryManager categoryManager,
            IPlatformService platformService,
            Category category,
            Channel channel)
        {
            _categoryManager = categoryManager;
            _platformService = platformService;
            _channelGroup    = channelGroup;
            _category        = category;
            _channel         = channel;

            Copy = ReactiveCommand.CreateFromTask(() => _platformService.CopyTextToClipboard(Url));
            Open = ReactiveCommand.CreateFromTask(DoOpen,
                                                  this.WhenAnyValue(x => x.Url, url => Uri
                                                                    .IsWellFormedUriString(url, UriKind.Absolute)));

            Notify = _channel.Notify;
            this.ObservableForProperty(x => x.Notify)
            .Select(property => property.Value)
            .Do(notify => _channel.Notify = notify)
            .Select(notify => channel)
            .SelectMany(_categoryManager.Update)
            .Subscribe();

            Delete = ReactiveCommand.CreateFromTask(DoDelete);
            Delete.ObserveOn(RxApp.MainThreadScheduler)
            .Subscribe(x => _channelGroup.Channels.Remove(this));
        }
Пример #27
0
        public UserViewModel(IPlatformService platformService, IUserService userService, ICompanyService companyService) : base(platformService)
        {
            MessageText = GetResource(ResKeys.mobile_members_user_message);

            _userService    = userService;
            _companyService = companyService;
        }
Пример #28
0
 public SplashViewModel(HttpWorker httpWorker, IMemberHandler memberHandler, IPlatformService platformService, SettingService settingService)
 {
     _httpFactory     = httpWorker;
     _settingServicce = settingService;
     _memberHandler   = memberHandler;
     _platformService = platformService;
 }
Пример #29
0
        public RegexHelperTest()
        {
            var mock = new Mock <IPlatformService>();

            mock.Setup(p => p.DeviceFamily).Returns(DeviceFamily.WindowsMobile);
            this.platformService = mock.Object;
        }
Пример #30
0
        public CreateChatViewModel(IPlatformService platformService, IUserService userService) : base(platformService)
        {
            _userService = userService;

            Title         = "Start conversation";
            SelectedItems = new ObservableCollection <IUser>();
        }
Пример #31
0
        public RoomIndexViewModel(IPlatformService platformService, IBookingService bookingService) : base(platformService)
        {
            _bookingService = bookingService;

            RoomList        = new ObservableCollection <RoomIndexItemViewModel>();
            OverViewCommand = new MvxCommand(() => ShowViewModel <RoomTimeIndexViewModel>());
        }
 internal SessionTelemetryModule(IPlatformService platform, IClock clock)
 {
     Debug.Assert(platform != null, "platform");
     Debug.Assert(clock != null, "clock");
     this.platform = platform;
     this.clock = clock;
 }
		public SlideshowChooserController(ISlideshowPickerViewer viewer, IPlatformService platformService)
		{
			Viewer = viewer;
			PlatformService = platformService;
			EditedSlideshow =  new SlideshowModel();
			SavedSlideshows = new List<SlideshowModel>();

			NotifyPropertyChangedHelper.SetupPropertyChanged(EditedSlideshow, (c, h) => _editedHasChanged = true);

            var filename = SlideshowModel.EnsureExtension(Preferences<WatchThisPreferences>.Instance.LastEditedFilename);
			if (File.Exists(filename))
			{
				try
				{
					EditedSlideshow = SlideshowModel.ParseFile(filename);
					EditedSlideshow.Filename = null;
				}
				catch (Exception ex)
				{
					logger.Error("Error loading lastEdited '{0}': {1}", filename, ex);
				}
			}
		}
Пример #34
0
		static public SlideshowDriver Create(string filename, ISlideshowViewer viewer, IPlatformService platformService)
		{
			return Create(SlideshowModel.ParseFile(filename), viewer, platformService);
		}
Пример #35
0
		static public SlideshowDriver Create(SlideshowModel model, ISlideshowViewer viewer, IPlatformService platformService)
		{
			var driver = new SlideshowDriver(model, viewer, platformService);
			driver.BeginEnumerate();
			return driver;
		}
 private static PlatformInfo GetPlatformInfo()
 {
     Assembly assembly = TryLoadAssembly(BindingAssemblyName, null);
     if (assembly == null)
         return XamarinFormsExtensions.GetPlatformInfo();
     TypeInfo serviceType = typeof(IPlatformService).GetTypeInfo();
     serviceType = assembly.DefinedTypes.FirstOrDefault(serviceType.IsAssignableFrom);
     if (serviceType != null)
     {
         _platformService = (IPlatformService)Activator.CreateInstance(serviceType.AsType());
         BindingServiceProvider.ValueConverter = _platformService.ValueConverter;
     }
     return _platformService == null
         ? XamarinFormsExtensions.GetPlatformInfo()
         : _platformService.GetPlatformInfo();
 }
		static public void FindSlideshows(string folder, ISlideshowListViewer viewer, IPlatformService platformService)
		{
			new SlideshowEnumerator { Folder = folder, Viewer = viewer, PlatformService = platformService }.Begin();
		}