Inheritance: INoteRepository
Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
		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;
		}