Esempio n. 1
0
        private void Setup()
        {
            LoadPackagesXML();
            // Estabilish authenticated connection
            HubServerConfig hubServerConfig = BuildHubServerConfig();
            RestConnection  restConnection  = new CredentialsResetConnection(hubServerConfig);

            Setup(restConnection);
        }
        public void Setup()
        {
            string projectDirectory = Directory.GetParent(ProjectPath).FullName;

            if (String.IsNullOrWhiteSpace(PackagesConfigPath))
            {
                PackagesConfigPath = CreateProjectPackageConfigPath(projectDirectory);
            }

            if (!String.IsNullOrWhiteSpace(HubUrl.Trim()))
            {
                // Estabilish authenticated connection
                HubServerConfig hubServerConfig = BuildHubServerConfig();
                RestConnection  restConnection  = new CredentialsResetConnection(hubServerConfig);
                Setup(restConnection);
            }

            if (String.IsNullOrWhiteSpace(OutputDirectory))
            {
                string currentDirectory = Directory.GetCurrentDirectory();
                OutputDirectory = $"{currentDirectory}{Path.DirectorySeparatorChar}{DEFAULT_OUTPUT_DIRECTORY}";
            }

            if (String.IsNullOrWhiteSpace(HubProjectName))
            {
                HubProjectName = Path.GetFileNameWithoutExtension(ProjectPath);
            }

            if (String.IsNullOrWhiteSpace(HubVersionName))
            {
                HubVersionName = GetProjectAssemblyVersion(projectDirectory);
            }

            // Set helper properties
            BdioPropertyHelper bdioPropertyHelper = new BdioPropertyHelper();

            BdioId = bdioPropertyHelper.CreateBdioId(HubProjectName, HubVersionName);
        }