<commit_before>﻿namespace Caliburn.Micro
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    public static class IoC
    {
        static Func<Type, string, object> getInstanceImplementation;
        static Func<Type, IEnumerable<object>> getAllInstancesImplementation;

        public static void Initialize(Func<Type, string, object> getInstance, Func<Type, IEnumerable<object >> getAllInstances)
        {
            getInstanceImplementation = getInstance;
            getAllInstancesImplementation = getAllInstances;
        }

        public static T GetInstance<T>()
        {
            return (T)GetInstance(typeof(T));
        }

        public static object GetInstance(Type serviceType)
        {
            return GetInstance(serviceType, null);
        }

        public static object GetInstance(Type serviceType, string key)
        {
            return getInstanceImplementation(serviceType, key);
        }

        public static IEnumerable<T> GetAllInstances<T>()
        {
            return GetAllInstances(typeof(T)).OfType<T>();
        }

        public static IEnumerable<object> GetAllInstances(Type serviceType)
        {
            return getAllInstancesImplementation(serviceType);
        }
    }
}<commit_msg>Fixed a typo.<commit_after>﻿namespace Caliburn.Micro
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    public static class IoC
    {
        static Func<Type, string, object> getInstanceImplementation;
        static Func<Type, IEnumerable<object>> getAllInstancesImplementation;

        public static void Initialize(Func<Type, string, object> getInstance, Func<Type, IEnumerable<object>> getAllInstances)
        {
            getInstanceImplementation = getInstance;
            getAllInstancesImplementation = getAllInstances;
        }

        public static T GetInstance<T>()
        {
            return (T)GetInstance(typeof(T));
        }

        public static object GetInstance(Type serviceType)
        {
            return GetInstance(serviceType, null);
        }

        public static object GetInstance(Type serviceType, string key)
        {
            return getInstanceImplementation(serviceType, key);
        }

        public static IEnumerable<T> GetAllInstances<T>()
        {
            return GetAllInstances(typeof(T)).OfType<T>();
        }

        public static IEnumerable<object> GetAllInstances(Type serviceType)
        {
            return getAllInstancesImplementation(serviceType);
        }
    }
}
{'fraction_non_alphanumeric': 0.07686482393032942, 'fraction_numerical': 0.0, 'mean_word_length': 2.1946795646916564, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '4723618', 'n_tokens_mistral': 686, 'n_tokens_neox': 648, 'n_words': 146}