<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Practices.Unity
{
    public static class UnityContainerExtensionMethods
    {
        public static IUnityContainer RegisterXDebugType<TFrom, TTo>(this IUnityContainer container) where TTo : TFrom
        {
#if XDEBUG
            return container.RegisterType<TFrom, TTo>();
#else
            return container;
#endif
        }

        public static IUnityContainer RegisterTypeSingleton<TFrom, TTo>(this IUnityContainer container, params InjectionMember[] injectionMembers) where TTo : TFrom
        {
            return container.RegisterType<TFrom, TTo>(new ContainerControlledLifetimeManager(), injectionMembers);
        }

        public static IUnityContainer RegisterTypeSingleton<T>(this IUnityContainer container, params InjectionMember[] injectionMembers)
        {
            return container.RegisterType<T>(new ContainerControlledLifetimeManager(), injectionMembers);
        }
    }
}<commit_msg>new extension method - ReigsterIEnumerable<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Practices.Unity
{
    public static class UnityContainerExtensionMethods
    {
        public static IUnityContainer RegisterXDebugType<TFrom, TTo>(this IUnityContainer container) where TTo : TFrom
        {
#if XDEBUG
            return container.RegisterType<TFrom, TTo>();
#else
            return container;
#endif
        }

        public static IUnityContainer RegisterTypeSingleton<TFrom, TTo>(this IUnityContainer container, params InjectionMember[] injectionMembers) where TTo : TFrom
        {
            return container.RegisterType<TFrom, TTo>(new ContainerControlledLifetimeManager(), injectionMembers);
        }

        public static IUnityContainer RegisterTypeSingleton<T>(this IUnityContainer container, params InjectionMember[] injectionMembers)
        {
            return container.RegisterType<T>(new ContainerControlledLifetimeManager(), injectionMembers);
        }

        public static IUnityContainer ReigsterIEnumerable(this IUnityContainer container)
        {
            return container.RegisterType(typeof(IEnumerable<>), new InjectionFactory((c, t, n) => c.ResolveAll(t.GetGenericArguments().Single())));
        }
    }
}
{'fraction_non_alphanumeric': 0.0780024762690879, 'fraction_numerical': 0.0, 'mean_word_length': 3.762278978388998, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 17, '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': '2764484', 'n_tokens_mistral': 615, 'n_tokens_neox': 595, 'n_words': 148}