public void Register(IBootstrapTask task) { Ensure.NotNull(task, "task"); BootstrapTaskDescriptor descriptor = new BootstrapTaskDescriptor(task.GetType()); descriptor.Imports.AddRange(context.DescriptorProvider.GetImports(descriptor.Type)); descriptor.Exports.AddRange(context.DescriptorProvider.GetExports(descriptor.Type)); descriptor.Instance = task; descriptors.Add(descriptor); }
protected bool AreConstraintsSatisfied(IBootstrapTask task) { IBootstrapConstraintContext context = new DefaultBootstrapConstraintContext(this); return(provider.GetConstraints(task.GetType()).IsSatisfied(task, context)); }