public async Task <TeamProject> GetSourceProjectAsync(CancellationToken cancellationToken) { if (_source == null && SourceServer != null && !String.IsNullOrEmpty(SourceProjectName)) { _source = await SourceServer.FindProjectAsync(SourceProjectName, cancellationToken).ConfigureAwait(false); } return(_source); }
public MigrationContext() { _sourceProject = new Lazy <TeamProject>(() => SourceServer?.FindProjectAsync(SourceProjectName, CancellationToken.None).Result); _targetProject = new Lazy <TeamProject>(() => TargetServer?.FindProjectAsync(TargetProjectName, CancellationToken.None).Result); }