2012-11-04 02:39:29 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using AutoMapper;
|
|
|
|
|
using NzbDrone.Api.QualityProfiles;
|
2012-11-09 17:28:59 +01:00
|
|
|
|
using NzbDrone.Api.Resolvers;
|
2012-11-04 02:39:29 +01:00
|
|
|
|
using NzbDrone.Core.Repository.Quality;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Api
|
|
|
|
|
{
|
|
|
|
|
public static class Bootstrapper
|
|
|
|
|
{
|
|
|
|
|
public static void Initialize()
|
|
|
|
|
{
|
2012-11-09 17:28:59 +01:00
|
|
|
|
//Mapper.CreateMap<QualityTypes, Int32>()
|
|
|
|
|
// .ForMember(dest => dest, opt => opt.ResolveUsing<QualityTypesToIntResolver>());
|
|
|
|
|
|
|
|
|
|
Mapper.CreateMap<Int32, QualityTypes>()
|
|
|
|
|
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => src));
|
|
|
|
|
|
2012-11-04 02:39:29 +01:00
|
|
|
|
Mapper.CreateMap<QualityProfile, QualityProfileModel>()
|
|
|
|
|
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.QualityProfileId));
|
|
|
|
|
|
|
|
|
|
Mapper.CreateMap<QualityProfileModel, QualityProfile>()
|
|
|
|
|
.ForMember(dest => dest.QualityProfileId, opt => opt.MapFrom(src => src.Id));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|