public static ReportViewModel CreateDesignInstance(bool hasWarnings = false, bool hasErrors = false)
        {
            var report = new SynchronizationReport();

            report.ADelta = "This is the ADelta";
            report.BDelta = "This is the BDelta";

            var reportName = SynchronizationReportName.Create(Guid.NewGuid(), new DateTime(2000, 10, 10), hasWarnings, hasErrors);

            var proxy = new ReportProxy(reportName, () => report, "The profile name");

            return(new ReportViewModel(proxy, NullSynchronizationReportRepository.Instance));
        }
        private void AddReportViewModel(SynchronizationReportName reportName)
        {
            string profileName;

            if (!_currentProfileNamesById.TryGetValue(reportName.SyncronizationProfileId, out profileName))
            {
                profileName = "<Not existing anymore>";
            }

            var reportProxy     = new ReportProxy(reportName, () => _reportRepository.GetReport(reportName), profileName);
            var reportViewModel = new ReportViewModel(reportProxy, _reportRepository);

            _reports.Add(reportViewModel);
        }
    public static ReportViewModel CreateDesignInstance (bool hasWarnings = false, bool hasErrors = false)
    {
      var report = new SynchronizationReport();
      report.ADelta = "This is the ADelta";
      report.BDelta = "This is the BDelta";

      var reportName = SynchronizationReportName.Create (Guid.NewGuid(), new DateTime (2000, 10, 10), hasWarnings, hasErrors);

      var proxy = new ReportProxy (reportName, () => report, "The profile name");

      return new ReportViewModel (proxy, NullSynchronizationReportRepository.Instance);
    }
 public ReportViewModel (ReportProxy reportProxy, ISynchronizationReportRepository reportRepository)
 {
   _reportRepository = reportRepository;
   _reportProxy = reportProxy;
 }
 public ReportViewModel(ReportProxy reportProxy, ISynchronizationReportRepository reportRepository)
 {
     _reportRepository = reportRepository;
     _reportProxy      = reportProxy;
 }
    private void AddReportViewModel (SynchronizationReportName reportName, SynchronizationReport report)
    {
      string profileName;
      if (!_currentProfileNamesById.TryGetValue (reportName.SyncronizationProfileId, out profileName))
        profileName = "<Not existing anymore>";

      var reportProxy = new ReportProxy (reportName, () => report, profileName);
      var reportViewModel = new ReportViewModel (reportProxy, _reportRepository);
      _reports.Add (reportViewModel);
    }