11using System ;
22using System . Collections ;
3+ using System . Collections . Generic ;
34using Microsoft . Build . Framework ;
45
56namespace TaskRunner
67{
7- public class BuildEngine : IBuildEngine
8+ public class BuildEngine : IBuildEngine4
89 {
910 public int ColumnNumberOfTaskNode => 0 ;
1011
@@ -14,9 +15,26 @@ public class BuildEngine : IBuildEngine
1415
1516 public string ProjectFileOfTaskNode => null ;
1617
18+ public bool IsRunningMultipleNodes => false ;
19+
1720 public bool BuildProjectFile ( string projectFileName , string [ ] targetNames , IDictionary globalProperties , IDictionary targetOutputs )
1821 {
19- throw new NotImplementedException ( ) ;
22+ throw new NotImplementedException ( nameof ( BuildProjectFile ) ) ;
23+ }
24+
25+ public bool BuildProjectFile ( string projectFileName , string [ ] targetNames , IDictionary globalProperties , IDictionary targetOutputs , string toolsVersion )
26+ {
27+ throw new NotImplementedException ( nameof ( BuildProjectFile ) ) ;
28+ }
29+
30+ public BuildEngineResult BuildProjectFilesInParallel ( string [ ] projectFileNames , string [ ] targetNames , IDictionary [ ] globalProperties , IList < string > [ ] removeGlobalProperties , string [ ] toolsVersion , bool returnTargetOutputs )
31+ {
32+ throw new NotImplementedException ( nameof ( BuildProjectFilesInParallel ) ) ;
33+ }
34+
35+ public bool BuildProjectFilesInParallel ( string [ ] projectFileNames , string [ ] targetNames , IDictionary [ ] globalProperties , IDictionary [ ] targetOutputsPerProject , string [ ] toolsVersion , bool useResultsCache , bool unloadProjectsOnCompletion )
36+ {
37+ throw new NotImplementedException ( nameof ( BuildProjectFilesInParallel ) ) ;
2038 }
2139
2240 public void LogCustomEvent ( CustomBuildEventArgs e )
@@ -38,5 +56,35 @@ public void LogWarningEvent(BuildWarningEventArgs e)
3856 {
3957 Console . WriteLine ( e . Message ) ;
4058 }
59+
60+ public void Reacquire ( )
61+ {
62+ throw new NotImplementedException ( nameof ( Reacquire ) ) ;
63+ }
64+
65+ public void Yield ( )
66+ {
67+ throw new NotImplementedException ( nameof ( Yield ) ) ;
68+ }
69+
70+ private Dictionary < object , object > registeredTaskObjects = new Dictionary < object , object > ( ) ;
71+
72+ public void RegisterTaskObject ( object key , object obj , RegisteredTaskObjectLifetime lifetime , bool allowEarlyCollection )
73+ {
74+ registeredTaskObjects [ key ] = obj ;
75+ }
76+
77+ public object GetRegisteredTaskObject ( object key , RegisteredTaskObjectLifetime lifetime )
78+ {
79+ registeredTaskObjects . TryGetValue ( key , out var value ) ;
80+ return value ;
81+ }
82+
83+ public object UnregisterTaskObject ( object key , RegisteredTaskObjectLifetime lifetime )
84+ {
85+ registeredTaskObjects . TryGetValue ( key , out var value ) ;
86+ registeredTaskObjects . Remove ( key ) ;
87+ return value ;
88+ }
4189 }
4290}
0 commit comments