15 types derived from SdkResolver
Microsoft.Build (1)
BackEnd\Components\SdkResolution\DefaultSdkResolver.cs (1)
25internal class DefaultSdkResolver : SdkResolverBase
Microsoft.Build.Engine.UnitTests (14)
BackEnd\SdkResolverLoader_Tests.cs (3)
399private sealed class MockSdkResolverThatDoesNotLoad : SdkResolverBase 418private sealed class MockSdkResolverNoPublicConstructor : SdkResolverBase 434private sealed class MockSdkResolverWithAssemblyPath : SdkResolverBase
BackEnd\SdkResolverService_Tests.cs (8)
838private sealed class MockResolverReturnsNull : SdkResolver 847private sealed class MockSdkResolver1 : SdkResolver 866private sealed class MockSdkResolver2 : SdkResolver 885private sealed class MockSdkResolverWithResolvableSdkPattern1 : SdkResolver 904private sealed class MockSdkResolverWithResolvableSdkPattern2 : SdkResolver 923private sealed class MockSdkResolverWithState : SdkResolver 948private sealed class MockSdkResolverThrows : SdkResolver 961private sealed class MockSdkResolverDefault : SdkResolver
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
785private sealed class MockExpandedSdkResolver : SdkResolver
InternalEngineHelpers.cs (2)
39internal sealed class ConfigurableMockSdkResolver : SdkResolver 131internal sealed class FileBasedMockSdkResolver : SdkResolver
82 references to SdkResolver
Microsoft.Build (40)
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (6)
20private readonly IReadOnlyList<SdkResolver> _defaultResolvers; 25private readonly ConcurrentDictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>> _resolversByManifest = new(); 30private IReadOnlyList<SdkResolver>? _allResolvers; 72internal override IReadOnlyList<SdkResolver> GetDefaultResolvers() => _defaultResolvers; 75internal override IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 93protected internal override IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location)
BackEnd\Components\SdkResolution\DefaultSdkResolver.cs (1)
7using SdkResolverBase = Microsoft.Build.Framework.SdkResolver;
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
42internal void InitializeForTests(SdkResolverLoader resolverLoader = null, IReadOnlyList<SdkResolver> resolvers = null)
BackEnd\Components\SdkResolution\SdkResolverException.cs (2)
18public SdkResolver Resolver { get; private set; } 22public SdkResolverException(string resourceName, SdkResolver resolver, SdkReference sdk, Exception innerException, params string[] args)
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (11)
38internal virtual IReadOnlyList<SdkResolver> GetDefaultResolvers() 41new List<SdkResolver> { new DefaultSdkResolver() } 42: new List<SdkResolver>(); 46internal virtual IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 50new List<SdkResolver> { new DefaultSdkResolver() } 51: new List<SdkResolver>(); 228.Where(t => t.info.IsClass && t.info.IsPublic && !t.info.IsAbstract && typeof(SdkResolver).IsAssignableFrom(t.type)) 255protected internal virtual IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location) 258var resolvers = new List<SdkResolver>(); 270protected virtual void LoadResolvers(string resolverPath, ElementLocation location, List<SdkResolver> resolvers) 288resolvers.Add((SdkResolver)Activator.CreateInstance(type));
BackEnd\Components\SdkResolution\SdkResolverService.cs (19)
41private readonly ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>> _resolverStateBySubmission = new ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>>(); 46private Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>> _manifestToResolvers; 195List<SdkResolver> resolvers; 262private List<SdkResolver> GetResolvers(IReadOnlyList<SdkResolverManifest> resolversManifests, LoggingContext loggingContext, ElementLocation sdkReferenceLocation) 265List<SdkResolver> resolvers = new List<SdkResolver>(); 268if (!_manifestToResolvers.TryGetValue(resolverManifest, out IReadOnlyList<SdkResolver> newResolvers)) 289IReadOnlyList<SdkResolver> resolvers, 309foreach (SdkResolver sdkResolver in resolvers) 402internal virtual void InitializeForTests(SdkResolverLoader resolverLoader = null, IReadOnlyList<SdkResolver> resolvers = null) 421_manifestToResolvers = new Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>>(); 448private object GetResolverState(int submissionId, SdkResolver resolver) 453ConcurrentDictionary<SdkResolver, object> resolverState; 479_manifestToResolvers = new Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>>(); 487IReadOnlyList<SdkResolver> defaultResolvers = _sdkResolverLoader.GetDefaultResolvers(); 529private void SetResolverState(int submissionId, SdkResolver resolver, object state) 534ConcurrentDictionary<SdkResolver, object> resolverState = _resolverStateBySubmission.GetOrAdd( 536_ => new ConcurrentDictionary<SdkResolver, object>(
Microsoft.Build.Engine.UnitTests (35)
BackEnd\SdkResolverLoader_Tests.cs (4)
20using SdkResolverBase = Microsoft.Build.Framework.SdkResolver; 348IReadOnlyList<SdkResolverBase> resolvers = loader.LoadAllResolvers(new MockElementLocation("file")); 461public Action<string, ElementLocation, List<SdkResolver>> LoadResolversAction { get; set; } 493protected override void LoadResolvers(string resolverPath, ElementLocation location, List<SdkResolver> resolvers)
BackEnd\SdkResolverService_Tests.cs (23)
88new List<SdkResolver> 362new List<SdkResolver> 447service.InitializeForTests(null, new List<SdkResolver>() { resolver }); 484service.InitializeForTests(null, new List<SdkResolver>() { resolver }); 531service.InitializeForTests(null, new List<SdkResolver>() { resolver }); 577service.InitializeForTests(null, new List<SdkResolver>() { resolver }); 617new List<SdkResolver> 645resolvers: new List<SdkResolver> 677resolvers: new List<SdkResolver> 719internal override void InitializeForTests(SdkResolverLoader resolverLoader = null, IReadOnlyList<SdkResolver> resolvers = null) 741private List<SdkResolver> _resolvers; 742private List<SdkResolver> _defaultResolvers; 743private List<(string ResolvableSdkPattern, SdkResolver Resolver)> _resolversWithPatterns; 769_resolvers = new List<SdkResolver> 777_defaultResolvers = new List<SdkResolver>(); 779_resolversWithPatterns = new List<(string ResolvableSdkPattern, SdkResolver Resolver)>(); 782internal override IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 794foreach (SdkResolver resolver in _resolvers) 799foreach ((string ResolvableSdkPattern, SdkResolver Resolver) pair in _resolversWithPatterns) 810protected internal override IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location) 814var resolvers = new List<SdkResolver>(); 815foreach (var resolver in _resolvers) 832internal override IReadOnlyList<SdkResolver> GetDefaultResolvers()
BackEnd\SdkResultOutOfProc_Tests.cs (4)
213var sdkResolver = SetupSdkResolver(Path.GetDirectoryName(projectPath)); 227private SdkResolver SetupSdkResolver(string projectFolder) 270sdkService.InitializeForTests(null, new List<SdkResolver> { sdkResolver }); 276resolverService.InitializeForTests(null, new List<SdkResolver> { sdkResolver });
Definition\ProjectEvaluationContext_Tests.cs (2)
50private static void SetResolverForContext(EvaluationContext context, SdkResolver resolver) 54sdkService.InitializeForTests(null, new List<SdkResolver> { resolver });
InternalEngineHelpers.cs (2)
27public static ProjectOptions CreateProjectOptionsWithResolver(SdkResolver resolver) 31sdkService.InitializeForTests(null, new List<SdkResolver>() { resolver });
Microsoft.Build.Framework (7)
Sdk\SdkResolver.cs (1)
14/// Gets the name of the <see cref="SdkResolver"/> to be displayed in build output log.
Sdk\SdkResolverContext.cs (1)
11/// Context used by an <see cref="SdkResolver" /> to resolve an SDK.
Sdk\SdkResultFactory.cs (5)
12/// An abstract interface class provided to <see cref="SdkResolver" /> to create an 18/// Create an <see cref="SdkResolver" /> object indicating success resolving the SDK. 27/// Create an <see cref="SdkResolver" /> object indicating success resolving the SDK. 45/// Create an <see cref="SdkResolver" /> object indicating success. 69/// Create an <see cref="SdkResolver" /> object indicating failure resolving the SDK.