<commit_before>Abmes.UnityExtensions
====================

This project provides some extensions for the [Unity](http://unity.codeplex.com/) IoC container.

AutoFactory extensions
----------------------

This is an extension method for registering auto factories using the Unity.TypedFactories(https://github.com/PombeirP/Unity.TypedFactories) project.
It wraps the call with generic type arguments and returns the container so that its fluent interface can continue.

Instead of writing

	container.RegisterTypedFactory<IFooFactory>().ForConcreteType<Foo>();

you can write

	container.RegisterAutoFactory<IFooFactory, Foo>();

RegisterTypeSingleton extensions
--------------------------------

These are extension methods which pass the ContainerControlledLifetimeManager to the container so instead of writing

	container.RegisterType<IFoo, Foo>(new ContainerControlledLifetimeManager());

you can write

	container.RegisterTypeSingleton<IFoo, Foo>();<commit_msg>readme improvements<commit_after>Abmes.UnityExtensions
====================

This project provides some extensions for the [Unity](http://unity.codeplex.com/) IoC container.

AutoFactory extensions
----------------------

This is an extension method for registering auto factories using the [Unity.TypedFactories](https://github.com/PombeirP/Unity.TypedFactories) project.
It wraps the call with generic type arguments and returns the container so that its fluent interface can continue.

Instead of writing
```C#
container.RegisterTypedFactory<IFooFactory>().ForConcreteType<Foo>();
```
you can write
```C#
container.RegisterAutoFactory<IFooFactory, Foo>();
```
RegisterTypeSingleton extensions
--------------------------------

These are extension methods which pass the ContainerControlledLifetimeManager to the container so instead of writing

	container.RegisterType<IFoo, Foo>(new ContainerControlledLifetimeManager());

you can write

	container.RegisterTypeSingleton<IFoo, Foo>();
{'fraction_non_alphanumeric': 0.14636642784032752, 'fraction_numerical': 0.0, 'mean_word_length': 4.683139534883721, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '4275845', 'n_tokens_mistral': 492, 'n_tokens_neox': 463, 'n_words': 160}