Gramps.Controllers.ViewModels.ReportLaunchViewModel.Create C# (CSharp) Method

Create() public static method

public static Create ( IRepository repository, CallForProposal callForProposal, Report report, bool forExport = false ) : ReportLaunchViewModel
repository IRepository
callForProposal CallForProposal
report Report
forExport bool
return ReportLaunchViewModel
        public static ReportLaunchViewModel Create(IRepository repository, CallForProposal callForProposal, Report report, bool forExport = false)
        {
            Check.Require(repository != null, "Repository must be supplied");
            var viewModel = new ReportLaunchViewModel { CallForProposal = callForProposal, Report = report, ForExport = forExport};
            viewModel.AvailableQuestions = callForProposal.Questions.Select(a => a.Name).ToList();

            return GenerateGeneric(viewModel, report, callForProposal);
        }