public void Setup(RestConnection restConnection)
        {
            RestConnection = restConnection;

            // Create required dataservices
            CodeLocationDataService  = new CodeLocationResponseService(RestConnection);
            ScanSummariesDataService = new ScanSummariesResponseService(RestConnection);
            DeployBdioDataService    = new DeployBdioResponseService(RestConnection);
            ProjectDataService       = new ProjectResponseService(RestConnection);
            PolicyDataService        = new PolicyResponseService(RestConnection);
            RiskReportDataService    = new RiskReportResponseService(RestConnection);
            ScanStatusDataService    = new ScanStatusDataService(RestConnection, Convert.ToInt64(TimeSpan.FromSeconds(Convert.ToDouble(HubScanTimeout)).TotalMilliseconds));
        }
示例#2
0
        public ScanStatusDataService(RestConnection restConnection, long timeoutInMilliseconds) : base(restConnection)
        {
            projectDataService        = new ProjectResponseService(restConnection);
            projectVersionDataService = new ProjectVersionResponseService(restConnection);
            codeLocationDataService   = new CodeLocationResponseService(restConnection);
            scanSummaryDataService    = new ScanSummariesResponseService(restConnection);

            long timeout = timeoutInMilliseconds;

            if (timeoutInMilliseconds <= 0)
            {
                timeout = DEFAULT_TIMEOUT;
            }
            this.timeoutInMilliseconds = timeout;
        }
示例#3
0
        public void Setup(RestConnection restConnection)
        {
            RestConnection = restConnection;

            // Create required dataservices
            CodeLocationDataService  = new CodeLocationResponseService(RestConnection);
            ScanSummariesDataService = new ScanSummariesResponseService(RestConnection);
            DeployBdioDataService    = new DeployBdioResponseService(RestConnection);
            ProjectDataService       = new ProjectResponseService(RestConnection);
            PolicyDataService        = new PolicyResponseService(RestConnection);
            RiskReportDataService    = new RiskReportResponseService(RestConnection);
            ScanStatusDataService    = new ScanStatusDataService(RestConnection, Convert.ToInt64(TimeSpan.FromSeconds(Convert.ToDouble(HubScanTimeout)).TotalMilliseconds));

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

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