Skip to content

vincentbitter/dependency-sorter

Repository files navigation

Build status codecov NuGet NuGet

DependencySorter

Load your modules or plugins the right order by sorting them with Dependency Sorter.

How to use

DependencySorter is build as a generic IEnumerable, allowing you to sort any kind of object/type.

Example with strings:

var collection = new DependencyCollection<string>();
collection.Add("test2", "test");
collection.Add("test");

var list = collection.ToList(); // returns ["test", "test2"]

Example with types:

var collection = new DependencyCollection<Type>();
collection.Add(typeof(UserService), typeof(ConfigurationService));
collection.Add(typeof(ConfigurationService));

var list = collection.ToList(); // returns [ConfigurationService, UserService]

About

Load your modules or plugins the right order by sorting them with Dependency Sorter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages