public void Register(ICakeContainerRegistry registry) { if (registry == null) { throw new ArgumentNullException("registry"); } registry.RegisterInstance(_options).As <CakeOptions>(); registry.RegisterType <CakeArguments>().As <ICakeArguments>().Singleton(); }
public void Register(ICakeContainerRegistry registry) { if (registry == null) { throw new ArgumentNullException("registry"); } var root = _options.Script.GetDirectory(); var configuration = _provider.CreateConfiguration(root, _options.Arguments); registry.RegisterInstance(configuration).As <ICakeConfiguration>(); }
public void Register(ICakeContainerRegistry registry) { if (registry == null) { throw new ArgumentNullException("registry"); } var configuration = _provider.CreateConfiguration(_options.Arguments); Debug.Assert(configuration != null, "Configuration should not be null."); registry.RegisterInstance(configuration).As <ICakeConfiguration>(); }