Exemplo n.º 1
0
        public NuGetProjectProvider(IExtensibleProjectLocator extensibleProjectLocator, ITypeFactory typeFactory)
        {
            Argument.IsNotNull(() => extensibleProjectLocator);
            Argument.IsNotNull(() => typeFactory);

            _extensibleProjectLocator = extensibleProjectLocator;

            _defaultProject = typeFactory.CreateInstanceWithParametersAndAutoCompletion <ExampleProject>();

            _extensibleProjectLocator.Register(_defaultProject);
            _extensibleProjectLocator.Enable(_defaultProject);
        }
        public void ExtensibleProjectStatusChange(bool isShouldBeEnabled, IExtensibleProject project)
        {
            Argument.IsNotNull(() => project);

            if (isShouldBeEnabled)
            {
                _extensiblesManager.Enable(project);
            }
            else
            {
                _extensiblesManager.Disable(project);
            }
        }
 private void CreateAndRegisterDefaultProject()
 {
     _defaultProject = _typeFactory.CreateInstanceWithParametersAndAutoCompletion <DestFolder>(_configurationService.GetDestinationFolder());
     _extensibleProjectLocator.Register(_defaultProject);
     _extensibleProjectLocator.Enable(_defaultProject);
 }