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