public JiraTypeMap(ITicketSource jiraProject, IAvailableTicketTypes availableTicektTypes) { map = new Dictionary <string, string>(); jiraTicketTypes = jiraProject.GetAvailableTicketTypes(); availableTypes = availableTicektTypes; if (jiraTicketTypes.Count > 0) { map = SettingsStore.Load(key); var updateStore = false; foreach ( var jiraType in jiraTicketTypes.Where( jiraType => map.ContainsKey(jiraType) == false || availableTypes.Contains(map[jiraType]) == false)) { map[jiraType] = defaultsTo(jiraType); updateStore = true; } if (updateStore) { SettingsStore.Save(key, map); } } }
public JiraTypeMap(ITicketSource jiraProject, IAvailableTicketTypes availableTicektTypes) { map = new Dictionary<string, string>(); jiraTicketTypes = jiraProject.GetAvailableTicketTypes(); availableTypes = availableTicektTypes; if (jiraTicketTypes.Count > 0) { map = SettingsStore.Load(key); var updateStore = false; foreach ( var jiraType in jiraTicketTypes.Where( jiraType => map.ContainsKey(jiraType) == false || availableTypes.Contains(map[jiraType]) == false)) { map[jiraType] = defaultsTo(jiraType); updateStore = true; } if (updateStore) { SettingsStore.Save(key, map); } } }
public TicketImportAgent(ITicketSource ticketSource, ITicketTarget ticketTarget, bool includeAttachments) { this.ticketSource = ticketSource; this.ticketTarget = ticketTarget; this.ticketTarget.OnPercentComplete += onPercentComplete; this.ticketSource.OnPercentComplete += onPercentComplete; this.includeAttachments = includeAttachments; downloadFolder = ""; if (this.includeAttachments) { var directoryName = string.Format("{0}_to_{1}", this.ticketSource.Source, this.ticketTarget.Target); downloadFolder = Path.Combine(Path.GetTempPath(), directoryName); Directory.CreateDirectory(downloadFolder); } }
public TicketAuthenticationSession(ITicketSource source, ISystemTime systemTime, AuthenticationSettings settings) { _source = source; _systemTime = systemTime; _settings = settings; }
public JiraTypeMap(ITicketSource jiraProject, IAvailableTicketTypes availableTicketTypes) : this(jiraProject, availableTicketTypes, true) { }