示例#1
0
        public void Register(ICakeContainerRegistry registry)
        {
            if (registry == null)
            {
                throw new ArgumentNullException("registry");
            }

            registry.RegisterInstance(_options).As <CakeOptions>();
            registry.RegisterType <CakeArguments>().As <ICakeArguments>().Singleton();
        }
示例#2
0
        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>();
        }
示例#3
0
        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>();
        }