December 2018
Intermediate to advanced
416 pages
10h 30m
English
The resolver will be responsible for creating our objects for us based on the type that we request. Let's create the resolver:
using Autofac;namespace DoToo{ public static class Resolver { private static IContainer container; public static void Initialize(IContainer container) { Resolver.container = container; } public static T Resolve<T>() { return container.Resolve<T>(); } }}
The container property of the IContainer type is defined in Autofac and represents a container that holds the configuration on how to resolve types. The Initialize method takes an instance of an object that implements ...
Read now
Unlock full access