public TestManagementContext(IMigrationClient source, string testPlanQueryBit) { this.testPlanQueryBit = testPlanQueryBit; _source = source; tms = _source.GetService <ITestManagementService>(); Project = tms.GetTeamProject(source.Config.AsTeamProjectConfig().Project); }
public override void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true) { _config = MigrationClient.Config; _bypassRules = bypassRules ? WorkItemStoreFlags.BypassRules : WorkItemStoreFlags.None; _wistore = new WorkItemStore(MigrationClient.Config.Collection.ToString(), _bypassRules); _project = migrationClient.WorkItems.GetProject(); }
public void Configure(IMigrationClient migrationClient, bool bypassRules = true) { if (migrationClient is null) { throw new ArgumentNullException(nameof(migrationClient)); } _migrationClient = migrationClient; var startTime = DateTime.UtcNow; var timer = System.Diagnostics.Stopwatch.StartNew(); try { InnerConfigure(migrationClient, bypassRules); timer.Stop(); Telemetry.TrackDependency(new DependencyTelemetry("TeamService", "GetWorkItemStore", startTime, timer.Elapsed, true)); } catch (Exception ex) { timer.Stop(); Telemetry.TrackDependency(new DependencyTelemetry("TeamService", "GetWorkItemStore", startTime, timer.Elapsed, false)); Telemetry.TrackException(ex, new Dictionary <string, string> { { "CollectionUrl", MigrationClient.Config.Collection.ToString() } }, new Dictionary <string, double> { { "Time", timer.ElapsedMilliseconds } }); Log.Error(ex, "Unable to configure store"); throw; } }
protected override void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true) { _config = MigrationClient.Config; _bypassRules = bypassRules ? WorkItemStoreFlags.BypassRules : WorkItemStoreFlags.None; _wistore = GetWorkItemStore(); _project = migrationClient.WorkItems.GetProject(); }
public void Configure(IMigrationClient migrationClient, bool bypassRules = true) { if (migrationClient is null) { throw new ArgumentNullException(nameof(migrationClient)); } _migrationClient = migrationClient; InnerConfigure(migrationClient, bypassRules); }
private IMigrationClient GetTarget() { if (_Target is null) { var credentials = CheckForNetworkCredentials(_networkCredentials.Target); _Target = _services.GetRequiredService <IMigrationClient>(); _Target.Configure(Config.Target, credentials); } return(_Target); }
private IMigrationClient GetSource() { if (_Source is null) { var credentials = CheckForNetworkCredentials(_networkCredentials.Source); _Source = _services.GetRequiredService <IMigrationClient>(); _Source.Configure(Config.Source, credentials); } return(_Source); }
public void Configure(IMigrationClient migrationClient, string query, Dictionary <string, string> parameters) { if (string.IsNullOrEmpty(query)) { throw new ArgumentException($"'{nameof(query)}' cannot be null or empty", nameof(query)); } if (!int.TryParse(query, out _query)) { throw new ArgumentException($"'{nameof(query)}' must be an integer", nameof(query)); } }
public string NodeStructureTypeToLanguageSpecificName(IMigrationClient client, TfsNodeStructureType value) { // insert switch statement here switch (value) { case TfsNodeStructureType.Area: return(client.Config.AsTeamProjectConfig().LanguageMaps.AreaPath); case TfsNodeStructureType.Iteration: return(client.Config.AsTeamProjectConfig().LanguageMaps.IterationPath); default: throw new InvalidOperationException("Not a valid NodeStructureType "); } }
public abstract void InnerConfigure(IMigrationClient migrationClient, bool bypassRules = true);
public TestManagementContext(IMigrationClient source) : this(source, null) { }
public void Configure(IMigrationClient migrationClient, bool bypassRules = true) { }
public void Configure(IMigrationClient migrationClient, string query, Dictionary <string, string> parameters) { _MigrationClient = migrationClient ?? throw new ArgumentNullException(nameof(migrationClient)); _Query = query ?? throw new ArgumentNullException(nameof(query)); _Parameters = parameters ?? throw new ArgumentNullException(nameof(parameters)); }