<commit_before>﻿using System.Data.Common;
using System.Data.SQLite;

using Mono.Data.Sqlite;

using Ninject.Modules;
using NZBDash.Common.Models.Data.Models;
using NZBDash.Common.Models.Data.Models.Settings;
using NZBDash.DataAccessLayer;
using NZBDash.DataAccessLayer.Configuration;
using NZBDash.DataAccessLayer.Interfaces;
using NZBDash.DataAccessLayer.Repository;

namespace NZBDash.DependencyResolver.Modules
{
	public class SqliteModule : NinjectModule
	{
		public override void Load()
		{
			Bind<ISqlRepository<SonarrSettings>>().To<SonarrRepository>();
			Bind<ISqlRepository<PlexSettings>>().To<PlexRepository>();
            Bind<ISqlRepository<NzbGetSettings>>().To<NzbGetRepository>();
            Bind<ISqlRepository<CouchPotatoSettings>>().To<CouchPotatoRepository>();
            Bind<ISqlRepository<SabNzbSettings>>().To<SabNzbRepository>();
            Bind<ISqlRepository<LinksConfiguration>>().To<LinksRepository>();



#if WINDOWS || DEBUG
            Bind<ISqliteConfiguration>().To<WindowsSqliteConfiguration>();
            Bind<DbProviderFactory>().To<SQLiteFactory>();
#endif

#if LINUX <commit_msg>Added the #IF Linux around the using statement on the SqliteModule (Build is using Windows Server currently).<commit_after>﻿using System.Data.Common;
using System.Data.SQLite;

#if LINUX 
using Mono.Data.Sqlite;
#endif

using Ninject.Modules;
using NZBDash.Common.Models.Data.Models;
using NZBDash.Common.Models.Data.Models.Settings;
using NZBDash.DataAccessLayer;
using NZBDash.DataAccessLayer.Configuration;
using NZBDash.DataAccessLayer.Interfaces;
using NZBDash.DataAccessLayer.Repository;

namespace NZBDash.DependencyResolver.Modules
{
	public class SqliteModule : NinjectModule
	{
		public override void Load()
		{
			Bind<ISqlRepository<SonarrSettings>>().To<SonarrRepository>();
			Bind<ISqlRepository<PlexSettings>>().To<PlexRepository>();
            Bind<ISqlRepository<NzbGetSettings>>().To<NzbGetRepository>();
            Bind<ISqlRepository<CouchPotatoSettings>>().To<CouchPotatoRepository>();
            Bind<ISqlRepository<SabNzbSettings>>().To<SabNzbRepository>();
            Bind<ISqlRepository<LinksConfiguration>>().To<LinksRepository>();



#if WINDOWS || DEBUG
            Bind<ISqliteConfiguration>().To<WindowsSqliteConfiguration>();
            Bind<DbProviderFactory>().To<SQLiteFactory>();
#endif

#if LINUX 
{'fraction_non_alphanumeric': 0.12267343485617598, 'fraction_numerical': 0.0, 'mean_word_length': 5.426630434782608, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6339298', 'n_tokens_mistral': 743, 'n_tokens_neox': 693, 'n_words': 107}