Пример #1
0
        public ViewModel(IExrinContainer exrinContainer, IVisualState visualState, [CallerFilePath] string caller = nameof(ViewModel))
        {
            if (exrinContainer == null)
            {
                throw new ArgumentNullException(nameof(IExrinContainer));
            }

            _applicationInsights  = exrinContainer.ApplicationInsights;
            _displayService       = exrinContainer.DisplayService;
            _navigationService    = exrinContainer.NavigationService;
            _errorHandlingService = exrinContainer.ErrorHandlingService;

            VisualState = visualState;

            if (VisualState != null)
            {
                Task.Run(() => visualState.Init())
                .ContinueWith((task) =>
                {
                    if (task.Exception != null)
                    {
                        _applicationInsights.TrackException(task.Exception);
                    }
                });
            }

            Execution = new Execution()
            {
                HandleTimeout          = TimeoutHandle,
                NotifyOfActivity       = NotifyActivity,
                NotifyActivityFinished = NotifyActivityFinished,
                HandleResult           = HandleResult
            };
        }
Пример #2
0
        public ViewModel(IExrinContainer exrinContainer, IVisualState visualState, [CallerFilePath] string caller = nameof(ViewModel))
        {

            if (exrinContainer == null)
                throw new ArgumentNullException(nameof(IExrinContainer));

            _applicationInsights = exrinContainer.ApplicationInsights;
            _displayService = exrinContainer.DisplayService;
            _navigationService = exrinContainer.NavigationService;
            _errorHandlingService = exrinContainer.ErrorHandlingService;

            VisualState = visualState;

            if (VisualState != null)
                Task.Run(() => visualState.Init())
                    .ContinueWith((task) =>
                    {
                        if (task.Exception != null)
                            _applicationInsights.TrackException(task.Exception);
                    });

            Execution = new Execution()
            {
                HandleTimeout = TimeoutHandle,
                NotifyOfActivity = NotifyActivity,
                NotifyActivityFinished = NotifyActivityFinished,
                HandleResult = HandleResult
            };

        }
Пример #3
0
        public AuthModel(IExrinContainer exrinContainer, IAuthenticationService service)
            : base(exrinContainer, new AuthModelState())
        {
            _service = service;

            // TEMP: Just to demonstrate the login function if AuthenticationExpired is called
            //ThreadHelper.RunOnUIThread(() =>
            //{
            //    Device.StartTimer(TimeSpan.FromSeconds(10), () => { AuthenticationExpired(); return false; });
            //});
        }
Пример #4
0
        public Model(IExrinContainer exrinContainer, IModelState modelState)
        {
            if (exrinContainer == null)
                throw new ArgumentNullException(nameof(IExrinContainer));

            _displayService = exrinContainer.DisplayService;
            _errorHandlingService = exrinContainer.ErrorHandlingService;
            _applicationInsights = exrinContainer.ApplicationInsights;

            ModelState = modelState;
            Execution = new ModelExecution()
            {
                HandleTimeout = TimeoutHandle,
                HandleUnhandledException = HandleError
            };
        }
Пример #5
0
        public ViewModel(IExrinContainer exrinContainer, IVisualState visualState, [CallerFilePath] string caller = "ViewModel")
        {
            if (exrinContainer == null)
            {
                throw new ArgumentNullException(nameof(IExrinContainer));
            }

            ApplicationInsights  = exrinContainer.ApplicationInsights;
            DisplayService       = exrinContainer.DisplayService;
            NavigationService    = exrinContainer.NavigationService;
            ErrorHandlingService = exrinContainer.ErrorHandlingService;
            _containerSet        = true;

            VisualState = visualState;

            SetExecution();
        }
Пример #6
0
        public Model(IExrinContainer exrinContainer, IModelState modelState)
        {
            if (exrinContainer == null)
            {
                throw new ArgumentNullException(nameof(IExrinContainer));
            }

            _displayService       = exrinContainer.DisplayService;
            _errorHandlingService = exrinContainer.ErrorHandlingService;
            _applicationInsights  = exrinContainer.ApplicationInsights;

            ModelState = modelState;
            Execution  = new ModelExecution()
            {
                HandleTimeout            = TimeoutHandle,
                HandleUnhandledException = HandleError
            };
        }
Пример #7
0
        void IComposition.SetContainer(IExrinContainer exrinContainer)
        {
            if (_containerSet)
            {
                return;
            }

            if (exrinContainer == null)
            {
                throw new ArgumentNullException(nameof(IExrinContainer));
            }

            ApplicationInsights  = exrinContainer.ApplicationInsights;
            DisplayService       = exrinContainer.DisplayService;
            ErrorHandlingService = exrinContainer.ErrorHandlingService;

            _containerSet = true;
        }
 public ServiceCentreViewModel(IAuthModel model, IServiceModel serviceModel, IExrinContainer exrinContainer) :
     base(model, exrinContainer, new ServiceCentreVisualState(serviceModel))
 {
 }
 public ServiceViewModel(IAuthModel authModel, IServiceModel model, IExrinContainer exrinContainer) :
     base(authModel, exrinContainer, new ServiceVisualState(model))
 {
     Model = model;
 }
Пример #10
0
 public AboutViewModel(IExrinContainer exrinContainer, IMainModel model) : base(exrinContainer, new AboutVisualState(model))
 {
 }
Пример #11
0
 public FourthViewModel(IExrinContainer exrinContainer) : base(exrinContainer, null)
 {
 }
 public ControlViewModel(IAuthModel authModel, IControlModel model, IExrinContainer exrinContainer) :
     base(authModel, exrinContainer, new ControlVisualState(model))
 {
     Model = model;
 }
Пример #13
0
 public BaseViewModel(IExrinContainer exrinContainer,
                      IVisualState visualState, string caller = nameof(BaseViewModel))
     : base(exrinContainer, visualState, caller)
 {
 }
Пример #14
0
 public LoginViewModel(IAuthModel model, IExrinContainer exrinContainer) :
     base(exrinContainer, new LoginVisualState(model))
 {
     _model = model;
 }
Пример #15
0
 public AboutViewModel(IAboutModel i_Model, IExrinContainer i_ExrinContainer)
     : base(i_ExrinContainer, new AboutVisualState(i_Model))
 {
     r_Model = i_Model;
 }
Пример #16
0
 public MainViewModel(IMainModel i_Model, IExrinContainer i_ExrinContainer)
     : base(i_ExrinContainer, new MainVisualState(i_Model))
 {
     r_Model = i_Model;
 }
Пример #17
0
 public FisrtModel(IExrinContainer exrinContainer) : base(exrinContainer, new FirstModelState())
 {
 }
Пример #18
0
 public MainModel(IExrinContainer i_ExrinContainer, IPersonsRepository i_PersonsRepository, ILogger <MainModel> i_Logger)
     : base(i_ExrinContainer, new MainModelState())
 {
     r_PersonsRepository = i_PersonsRepository;
     r_Logger            = i_Logger;
 }
Пример #19
0
 public PinViewModel(IAuthModel model, IExrinContainer exrinContainer) :
     base(model, exrinContainer, new PinVisualState(model))
 {
 }
Пример #20
0
 public MainModel(IExrinContainer exrinContainer)
     : base(exrinContainer, new MainModelState())
 {
 }
Пример #21
0
 public MainViewModel(IMainModel model, IExrinContainer exrinContainer)
     : base(exrinContainer, new MainVisualState(model))
 {
 }
 public BookingViewModel(IAuthModel model, IServiceModel serviceModel, IExrinContainer exrinContainer) :
     base(model, exrinContainer, new BookingVisualState(serviceModel))
 {
 }
Пример #23
0
 public ThirdViewModel(IExrinContainer exrinContainer) : base(exrinContainer, null)
 {
 }
Пример #24
0
 public BaseModel(IExrinContainer exrinContainer, IModelState modelState)
     : base(exrinContainer, modelState)
 {
 }
 public ClimateViewModel(IAuthModel authModel, IClimateModel model, IExrinContainer exrinContainer) :
     base(authModel, exrinContainer, new ClimateVisualState(model))
 {
     _model     = model;
     _container = exrinContainer;
 }
Пример #26
0
 public LoginModel(IExrinContainer i_ExrinContainer)
     : base(i_ExrinContainer, new LoginModelState())
 {
 }
 public MainViewModel(IAuthModel authModel, IExrinContainer exrinContainer) :
     base(authModel, exrinContainer, null)
 {
 }
Пример #28
0
 public AboutModel(IExrinContainer i_ExrinContainer, IPhoneDialer i_PhoneDialer, ILogger <AboutModel> i_Logger)
     : base(i_ExrinContainer, new AboutModelState())
 {
     r_PhoneDialer = i_PhoneDialer;
     r_Logger      = i_Logger;
 }
 public ServiceModel(IExrinContainer exrinContainer, IServiceService serviceService, IAuthModel authModel)
     : base(exrinContainer, new ServiceModelState())
 {
     _serviceService = serviceService;
 }
Пример #30
0
 public FirstViewModel(IExrinContainer exrinContainer, IFisrtModel model) : base(exrinContainer, new FirstVisualState(model))
 {
 }
Пример #31
0
 public SecondViewModel(IExrinContainer exrinContainer) : base(exrinContainer, null)
 {
 }
Пример #32
0
 public AuthModel(IExrinContainer exrinContainer)
     : base(exrinContainer, new AuthModelState())
 {
 }