public AssignmentPageViewModel(
            AssignmentPageViewModelConfiguration configuration,
            IAsyncQueryHandler <GetAssignmentAnswerKeyQuery, Result <AssignmentAnswerKey, Exception> > getAssignmentAsyncQueryHandler)
        {
            _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
            _getAssignmentAsyncQueryHandler = getAssignmentAsyncQueryHandler ?? throw new ArgumentNullException(nameof(getAssignmentAsyncQueryHandler));

            AssignmentData = configuration.Assignment.ToAssignmentInProgress(configuration.StudentID);
        }
Exemple #2
0
        public AssignmentPageView(Guid studentID, Assignment assignment)
        {
            InitializeComponent();
            var configuration = new AssignmentPageViewModelConfiguration(studentID, assignment);
            var container     = new Container();

            container.RegisterDependencies();
            container.RegisterInstance(configuration);
            BindingContext = container.GetInstance <AssignmentPageViewModel>();
        }