Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        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);
                }
            }
        }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 public TicketAuthenticationSession(ITicketSource source, ISystemTime systemTime, AuthenticationSettings settings)
 {
     _source     = source;
     _systemTime = systemTime;
     _settings   = settings;
 }
 public TicketAuthenticationSession(ITicketSource source, ISystemTime systemTime, AuthenticationSettings settings)
 {
     _source = source;
     _systemTime = systemTime;
     _settings = settings;
 }
Esempio n. 7
0
 public JiraTypeMap(ITicketSource jiraProject, IAvailableTicketTypes availableTicketTypes)
     : this(jiraProject, availableTicketTypes, true)
 {
 }