using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap;
using StructureMap.Configuration.DSL;
using Music.Model;
using Music.Presentation.Navigation;
using Music.StubRepository;
using Music.Presentation.Playlist;

namespace Web
{
    public class Bootstrapper
    {
        public static void ConfigureDependencies()
        {
            ObjectFactory.Initialize(x =>
                {
                    x.AddRegistry<ControllerRegistry>();
                });
        }

        public class ControllerRegistry : Registry
        {
            public ControllerRegistry()
            {
                For<IArtistRepository>().Use<ArtistRepository>();
                For<IAlbumRepository>().Use<AlbumRepository>();
                For<ISongRepository>().Use<SongRepository>();
                For<IPageNavigator>().Use<PageNavigator>();
                For<IPlaylist>().Use<Playlist>();
            }
        }
    }
}