<commit_before>﻿using System;
using N2.Persistence.NH;
using N2.Web;
using NHibernate;

namespace N2.Tests.Fakes
{
	public class FakeSessionProvider : SessionProvider, IDisposable
	{
		ISession session;
		IInterceptor interceptor;

		public FakeSessionProvider(IConfigurationBuilder builder, IInterceptor interceptor, IWebContext webContext)
			: base(builder, interceptor, webContext)
		{
			this.interceptor = interceptor;
		}

		public override SessionContext OpenSession
		{
			get
			{
				if(session == null)
					session = SessionFactory.OpenSession(interceptor);
				return CurrentSession ?? (CurrentSession = new SessionContext(this, session));
			}
		}

		public override void Dispose()<commit_msg>Added non-compiling test fake<commit_after>﻿using System;
using N2.Persistence.NH;
using N2.Web;
using NHibernate;

namespace N2.Tests.Fakes
{
	public class FakeSessionProvider : SessionProvider, IDisposable
	{
		ISession session;
		IInterceptor interceptor;

		public FakeSessionProvider(IConfigurationBuilder builder, IInterceptor interceptor, IWebContext webContext)
			: base(builder, interceptor, webContext, new N2.Configuration.DatabaseSection())
		{
			this.interceptor = interceptor;
		}

		public override SessionContext OpenSession
		{
			get
			{
				if(session == null)
					session = SessionFactory.OpenSession(interceptor);
				return CurrentSession ?? (CurrentSession = new SessionContext(this, session));
			}
		}

		public override void Dispose()
{'fraction_non_alphanumeric': 0.08152173913043478, 'fraction_numerical': 0.004755434782608696, 'mean_word_length': 4.776470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6712953', 'n_tokens_mistral': 492, 'n_tokens_neox': 419, 'n_words': 104}