Inheritance: ITaskListRepository
Exemplo n.º 1
0
        void IBackend.Initialize(IPreferences preferences)
        {
            if (preferences == null)
            {
                throw new ArgumentNullException("preferences");
            }

            database = new Database();
            database.Open();

            allList = new AllList(preferences);

            taskListRepo = new SqliteTaskListRepository(this, database);
            taskRepo     = new SqliteTaskRepository(this, database);
            noteRepo     = new SqliteNoteRepository(database);

            Factory = new TasqueObjectFactory(
                taskListRepo, taskRepo, noteRepo);

            IsInitialized = true;
            if (Initialized != null)
            {
                Initialized(this, EventArgs.Empty);
            }
        }
Exemplo n.º 2
0
		void IBackend.Initialize (IPreferences preferences)
		{
			if (preferences == null)
				throw new ArgumentNullException ("preferences");
			
			database = new Database ();
			database.Open ();

			taskListRepo = new SqliteTaskListRepository (database);
			taskRepo = new SqliteTaskRepository (database);
			noteRepo = new SqliteNoteRepository (database);

			IsInitialized = true;
			if (Initialized != null)
				Initialized (this, EventArgs.Empty);
		}