<commit_before>﻿using Microsoft.Xna.Framework.Graphics;
using RenderingLibrary.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RenderingLibrary.Content
{
    /// <summary>
    /// Provides a simple implementation of IContentLoader for applications
    /// using the LoaderManager and not specifying their own custom ContentLoader.
    /// This content loader uses the default SystemManagers internally.
    /// </summary>
    public class ContentLoader : IContentLoader
    {

        public T LoadContent<T>(string contentName)
        {
            if(typeof(T) == typeof(Texture2D))
            {
                var texture = LoaderManager.Self.Load(contentName, null);
                return (T)(object)texture;
            }
            else
            {
                throw new NotImplementedException();
            }<commit_msg>Added SystemsManagers to ContentLoader.<commit_after>﻿using Microsoft.Xna.Framework.Graphics;
using RenderingLibrary.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RenderingLibrary.Content
{
    /// <summary>
    /// Provides a simple implementation of IContentLoader for applications
    /// using the LoaderManager and not specifying their own custom ContentLoader.
    /// This content loader uses the default SystemManagers internally.
    /// </summary>
    public class ContentLoader : IContentLoader
    {
        public SystemManagers SystemManagers { get; set; }

        public T LoadContent<T>(string contentName)
        {
            if(typeof(T) == typeof(Texture2D))
            {
                var texture = LoaderManager.Self.Load(contentName, SystemManagers);
                return (T)(object)texture;
            }
            else
            {
                throw new NotImplementedException();
            }
{'fraction_non_alphanumeric': 0.08354689902614044, 'fraction_numerical': 0.0010251153254741158, 'mean_word_length': 2.424561403508772, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2637230', 'n_tokens_mistral': 484, 'n_tokens_neox': 470, 'n_words': 136}