Abc.Zebus.TinyHost.HostInitializerRegistrationConvention.Process C# (CSharp) Method

Process() public method

public Process ( Type type, Registry registry ) : void
type System.Type
registry Registry
return void
        public void Process(Type type, Registry registry)
        {
            if (!typeof(HostInitializer).IsAssignableFrom(type))
                return;

            if (!type.CanBeCreated() || type.ContainsGenericParameters)
                return;

            registry.For(typeof(HostInitializer)).Singleton().Add(ctx => ctx.GetInstance(type));
        }
    }
HostInitializerRegistrationConvention