public VstsReportingHelper(VstsMessage vstsContext, IBrokerInstrumentation baseInstrumentation, IDictionary <string, string> eventProperties, string timelineRecordName = null) { this.vstsContext = vstsContext; this.baseInstrumentation = baseInstrumentation; this.timelineRecordName = timelineRecordName; this.eventProperties = this.vstsContext.GetMessageProperties().AddRange(eventProperties); this.CreateTaskHttpClient = (uri, authToken, instrumentationHelper, skipRaisePlanEvents) => TaskClientFactory.GetTaskClient(uri, authToken, instrumentationHelper, skipRaisePlanEvents); this.CreateBuildClient = (uri, authToken) => new BuildClient(uri, new VssBasicCredential(string.Empty, authToken)); this.CreateReleaseClient = (uri, authToken) => new ReleaseClient(uri, new VssBasicCredential(string.Empty, authToken)); }
protected virtual ITaskClient GetTaskClient(Uri vstsPlanUrl, string authToken, bool skipRaisePlanEvents) { return(TaskClientFactory.GetTaskClient(vstsPlanUrl, authToken, clientLogger, skipRaisePlanEvents)); }