public static ReactiveViewModelRequest ViewCreated(this IReactiveView This, Intent intent)
        {
            // on Android we need to parse the Intent into a ReactiveViewModelRequest
            var translatorService = Locator.Current.GetService <IAndroidReactiveViewModelRequestTranslator>();
            var viewModelRequest  = translatorService.GetViewModelRequestForIntent(intent);

            This.ViewCreated(viewModelRequest);

            return(viewModelRequest);
        }
        public static ReactiveViewModelRequest ViewCreated(this IReactiveView This, Uri viewModelRequestUri)
        {
            // on Windows Phone Silverlight we need to parse the Uri into a ReactiveViewModelRequest
            var translatorService = Locator.Current.GetService <IPhoneReactiveViewModelRequestTranslator>();
            var viewModelRequest  = translatorService.GetViewModelRequestForUri(viewModelRequestUri);

            This.ViewCreated(viewModelRequest);

            return(viewModelRequest);
        }
Пример #3
0
        public static void ViewCreated(this IReactiveView This, ReactiveViewModelRequest viewModelRequest)
        {
            This.ViewCreated(() =>
            {
                var viewModelLocator = Locator.Current.GetService <IViewModelLocator>();
                var viewModel        = viewModelLocator.GetViewModelForViewModelType(viewModelRequest.ViewModelType, viewModelRequest.Parameters);

                return(viewModel);
            });
        }