@@ -100,6 +100,7 @@ class RepositoryManager : IRepositoryManager
100100 private readonly IProcessManager processManager ;
101101 private readonly IRepositoryPathConfiguration repositoryPaths ;
102102 private readonly IFileSystem fileSystem ;
103+ private readonly CancellationToken token ;
103104 private readonly IRepositoryWatcher watcher ;
104105
105106 private bool isBusy ;
@@ -116,11 +117,13 @@ class RepositoryManager : IRepositoryManager
116117 public RepositoryManager ( IGitConfig gitConfig ,
117118 IRepositoryWatcher repositoryWatcher , IGitClient gitClient ,
118119 IProcessManager processManager ,
119- IRepositoryPathConfiguration repositoryPaths ,
120- IFileSystem fileSystem )
120+ IFileSystem fileSystem ,
121+ CancellationToken token ,
122+ IRepositoryPathConfiguration repositoryPaths )
121123 {
122124 this . repositoryPaths = repositoryPaths ;
123125 this . fileSystem = fileSystem ;
126+ this . token = token ;
124127 this . gitClient = gitClient ;
125128 this . processManager = processManager ;
126129 this . watcher = repositoryWatcher ;
@@ -129,7 +132,8 @@ public RepositoryManager(IGitConfig gitConfig,
129132 SetupWatcher ( ) ;
130133 }
131134
132- public static RepositoryManager CreateInstance ( IPlatform platform , ITaskManager taskManager , IGitClient gitClient , IProcessManager processManager , NPath repositoryRoot , IFileSystem fileSystem )
135+ public static RepositoryManager CreateInstance ( IPlatform platform , ITaskManager taskManager , IGitClient gitClient ,
136+ IProcessManager processManager , IFileSystem fileSystem , NPath repositoryRoot )
133137 {
134138 var repositoryPathConfiguration = new RepositoryPathConfiguration ( repositoryRoot ) ;
135139 string filePath = repositoryPathConfiguration . DotGitConfig ;
@@ -138,7 +142,8 @@ public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager
138142 var repositoryWatcher = new RepositoryWatcher ( platform , repositoryPathConfiguration , taskManager . Token ) ;
139143
140144 return new RepositoryManager ( gitConfig , repositoryWatcher ,
141- gitClient , processManager , repositoryPathConfiguration , fileSystem ) ;
145+ gitClient , processManager , fileSystem ,
146+ taskManager . Token , repositoryPathConfiguration ) ;
142147 }
143148
144149 public void Initialize ( )
@@ -389,7 +394,7 @@ public void UpdateLocks()
389394
390395 private ITask HookupHandlers ( ITask task , bool isExclusive , bool filesystemChangesExpected )
391396 {
392- return new ActionTask ( CancellationToken . None , ( ) => {
397+ return new ActionTask ( token , ( ) => {
393398 if ( isExclusive )
394399 {
395400 Logger . Trace ( "Starting Operation - Setting Busy Flag" ) ;
0 commit comments