/// <summary> /// Initializes a new instance of the <see cref="TfsSink"/> class. /// </summary> /// <param name="tfsServiceProvider"> /// Service endpoint. /// </param> /// <param name="credential"> /// The credential. /// </param> /// <param name="parentWorkItem"> /// Parent work item id for all tasks. /// </param> /// <param name="fieldMap">Map of work item fields to mail properties.</param> protected TfsSink(ITfsServiceProvider tfsServiceProvider, NetworkCredential credential, int parentWorkItem, string workItemType, IDictionary <string, object> fieldMap) { if (credential == null) { throw new ArgumentNullException(nameof(credential)); } if (fieldMap == null) { throw new ArgumentNullException(nameof(fieldMap)); } this.logger = Log.Logger.ForContext <TfsSink>(); this.tfsServiceProvider = tfsServiceProvider; this.fieldMap = fieldMap; this.tfsServiceProviderConfiguration = new TfsServiceProviderConfiguration(credential.UserName, credential.Password) { ParentWorkItemId = parentWorkItem, WorkItemType = string.IsNullOrEmpty(workItemType) ? "Task" : workItemType }; }
/// <summary> /// Initializes a new instance of the <see cref="TfsSink"/> class. /// </summary> /// <param name="tfsServiceProvider"> /// Service endpoint. /// </param> /// <param name="credential"> /// The credential. /// </param> /// <param name="parentWorkItem"> /// Parent work item id for all tasks. /// </param> /// <param name="fieldMap">Map of work item fields to mail properties.</param> protected TfsSink(ITfsServiceProvider tfsServiceProvider, NetworkCredential credential, int parentWorkItem, string workItemType, IDictionary<string, object> fieldMap) { if (credential == null) { throw new ArgumentNullException(nameof(credential)); } if (fieldMap == null) { throw new ArgumentNullException(nameof(fieldMap)); } this.logger = Log.Logger.ForContext<TfsSink>(); this.tfsServiceProvider = tfsServiceProvider; this.fieldMap = fieldMap; this.tfsServiceProviderConfiguration = new TfsServiceProviderConfiguration(credential.UserName, credential.Password) { ParentWorkItemId = parentWorkItem, WorkItemType = string.IsNullOrEmpty(workItemType) ? "Task" : workItemType }; }
public void InitializeTest() { // Reset the connection state at start of test this.tfsServiceProvider = this.CreateTfsServiceProvider(); this.tfsServiceProviderDefaultConfig = this.CreateDefaultConfiguration(); }
public TestableTfsSink(ITfsServiceProvider serviceProvider, NetworkCredential credential, int parentWorkItemId, string workItemType, Dictionary <string, object> fieldMap) : base(serviceProvider, credential, parentWorkItemId, workItemType, fieldMap) { }
public TestableTfsSink(ITfsServiceProvider serviceProvider, NetworkCredential credential, int parentWorkItemId, string workItemType, Dictionary<string, object> fieldMap) : base(serviceProvider, credential, parentWorkItemId, workItemType, fieldMap) { }