mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
33 lines
837 B
C#
33 lines
837 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using Semmle.Util;
|
|
|
|
namespace Semmle.Extraction.CSharp.DependencyFetching
|
|
{
|
|
/// <summary>
|
|
/// Dependency fetching related options.
|
|
/// </summary>
|
|
public interface IDependencyOptions
|
|
{
|
|
/// <summary>
|
|
/// The number of threads to use.
|
|
/// </summary>
|
|
int Threads { get; }
|
|
|
|
/// <summary>
|
|
/// The path to the local ".dotnet" directory, if any.
|
|
/// </summary>
|
|
string? DotNetPath { get; }
|
|
}
|
|
|
|
public class DependencyOptions : IDependencyOptions
|
|
{
|
|
public static IDependencyOptions Default => new DependencyOptions();
|
|
|
|
public int Threads { get; set; } = EnvironmentVariables.GetDefaultNumberOfThreads();
|
|
|
|
public string? DotNetPath { get; set; } = null;
|
|
}
|
|
}
|