コード例 #1
0
 private static void AddThreeDreamEntriesTwoDays(IDreamDiaryViewModel entityUnderTest)
 {
     foreach (var dreamEntry in GetThreeDreamEntriesTwoDays())
     {
         entityUnderTest.AddEntry(dreamEntry);
     }
 }
コード例 #2
0
ファイル: FrmMain.cs プロジェクト: seranfuen/edreams
 public FrmMain([NotNull] IEdreamsFactory factory)
 {
     InitializeComponent();
     _factory   = factory ?? throw new ArgumentNullException(nameof(factory));
     _viewModel = factory.CreateDreamDiaryViewModel();
     BindingSource.DataSource        = _viewModel;
     _dreamDiaryBus                  = new DreamDiaryBus(_viewModel, factory.CreateDreamReaderWriterFactory());
     _dreamDiaryBus.DiaryPersisted  += (s, e) => RefreshEntries();
     _dreamDiaryBus.SearchPerformed += (s, e) => RefreshEntries();
     InitializeInterface();
 }
コード例 #3
0
 public DreamDiaryBus([NotNull] IDreamDiaryViewModel dreamDiary,
                      IDreamReaderWriterFactory dreamReaderWriterFactory)
 {
     _dreamDiary = dreamDiary ?? throw new ArgumentNullException(nameof(dreamDiary));
     _dreamReaderWriterFactory = dreamReaderWriterFactory;
 }