public void Initialize(IPreferences preferences) { if (preferences == null) { throw new ArgumentNullException("preferences"); } if (IsInitialized) { return; } // Establish connection to backend // Nothing to do for Dummy Backend // Setup repos noteRepo = new NoteRepository(this); taskListRepo = new TaskListRepository(this); taskRepo = new TaskRepository(this); // Setup TasqueObjectFactory Factory = new TasqueObjectFactory( taskListRepo, taskRepo, noteRepo); IsConfigured = true; IsInitialized = true; if (Initialized != null) { Initialized(this, EventArgs.Empty); } }
public void Initialize (IPreferences preferences) { if (preferences == null) throw new ArgumentNullException ("preferences"); if (IsInitialized) return; // Establish connection to backend // Nothing to do for Dummy Backend // Setup repos noteRepo = new NoteRepository (this); taskListRepo = new TaskListRepository (this); taskRepo = new TaskRepository (this); IsInitialized = true; }