<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

#if !NETSTANDARD

using System.ServiceModel;
using System.ServiceModel.Description;

#endif

using LinqToDB;
using LinqToDB.Common;
using LinqToDB.Data;
using LinqToDB.Extensions;
using LinqToDB.Mapping;

#if !NETSTANDARD

using LinqToDB.ServiceModel;

#endif 

using NUnit.Framework;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;
using NUnit.Framework.Internal.Builders;

//[assembly: Parallelizable]

namespace Tests
{
	using Model;

	public class TestBase
	{
		static TestBase()
		{
			Console.WriteLine("Tests started in {0}...",
#if NETSTANDARD
				System.IO.Directory.GetCurrentDirectory()
#else
				Environment.CurrentDirectory
#endif
				);

			var traceCount = 0;

			DataConnection.TurnTraceSwitchOn();
			DataConnection.WriteTraceLine = (s1,s2) =>
			{
				if (traceCount < 1000)
				{
					Console.WriteLine("{0}: {1}", s2, s1);
					Debug.WriteLine(s1, s2);
				}
#if MONO
				else
					Console.Write("z");
#else
				if (traceCount++ > 1000)
					DataConnection.TurnTraceSwitchOn(TraceLevel.Off);
#endif
			};

			//Configuration.AvoidSpecificDataProviderAPI = true;
			//Configuration.Linq.GenerateExpressionTest = true;
			var assemblyPath = typeof(TestBase).AssemblyEx().GetPath();

			ProjectPath = FindProjectPath(assemblyPath);

			SqlServerTypes.Utilities.LoadNativeAssemblies(assemblyPath);

#if NETSTANDARD
			System.IO.Directory.SetCurrentDirectory(assemblyPath);
#else
			Environment.CurrentDirectory = assemblyPath;
#endif
#if NETSTANDARD
			var userDataProviders    = Path.Combine(ProjectPath, @"UserDataProviders.Core.txt");
			var defaultDataProviders = Path.Combine(ProjectPath, @"DefaultDataProviders.Core.txt");
#else
			var userDataProviders    = Path.Combine(ProjectPath, @"UserDataProviders.txt");
			var defaultDataProviders = Path.Combine(ProjectPath, @"DefaultDataProviders.txt");
#endif
			
			var providerListFile =<commit_msg>do not load Sql Server types for .Net Core & Mono<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

#if !NETSTANDARD

using System.ServiceModel;
using System.ServiceModel.Description;

#endif

using LinqToDB;
using LinqToDB.Common;
using LinqToDB.Data;
using LinqToDB.Extensions;
using LinqToDB.Mapping;

#if !NETSTANDARD

using LinqToDB.ServiceModel;

#endif 

using NUnit.Framework;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;
using NUnit.Framework.Internal.Builders;

//[assembly: Parallelizable]

namespace Tests
{
	using Model;

	public class TestBase
	{
		static TestBase()
		{
			Console.WriteLine("Tests started in {0}...",
#if NETSTANDARD
				System.IO.Directory.GetCurrentDirectory()
#else
				Environment.CurrentDirectory
#endif
				);

			var traceCount = 0;

			DataConnection.TurnTraceSwitchOn();
			DataConnection.WriteTraceLine = (s1,s2) =>
			{
				if (traceCount < 1000)
				{
					Console.WriteLine("{0}: {1}", s2, s1);
					Debug.WriteLine(s1, s2);
				}
#if MONO
				else
					Console.Write("z");
#else
				if (traceCount++ > 1000)
					DataConnection.TurnTraceSwitchOn(TraceLevel.Off);
#endif
			};

			//Configuration.AvoidSpecificDataProviderAPI = true;
			//Configuration.Linq.GenerateExpressionTest = true;
			var assemblyPath = typeof(TestBase).AssemblyEx().GetPath();

			ProjectPath = FindProjectPath(assemblyPath);

#if !NETSTANDARD && !MONO
			SqlServerTypes.Utilities.LoadNativeAssemblies(assemblyPath);
#endif

#if NETSTANDARD
			System.IO.Directory.SetCurrentDirectory(assemblyPath);
#else
			Environment.CurrentDirectory = assemblyPath;
#endif
#if NETSTANDARD
			var userDataProviders    = Path.Combine(ProjectPath, @"UserDataProviders.Core.txt");
			var defaultDataProviders = Path.Combine(ProjectPath, @"DefaultDataProviders.Core.txt");
#else
			var userDataProviders    = Path.Combine(ProjectPath, @"UserDataProviders.txt");
			var defaultDataProviders = Path.Combine(ProjectPath, @"DefaultDataProviders.txt");
#endif
			
			var providerListFile =
{'fraction_non_alphanumeric': 0.11172117450465505, 'fraction_numerical': 0.008593936500358081, 'mean_word_length': 4.73187414500684, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6162888', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1310, 'n_words': 271}