コード例 #1
0
ファイル: JiraTypeMap.cs プロジェクト: ice02/TfsJiraSynchro
        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);
                }
            }
        }
コード例 #2
0
ファイル: JiraTypeMap.cs プロジェクト: KilskyreMan/JiraToTfs
        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);
                }
            }
        }
コード例 #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);
     }
 }
コード例 #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);
     }
 }
コード例 #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;
 }
コード例 #7
0
ファイル: JiraTypeMap.cs プロジェクト: hlvtrinh/JiraToTfs
 public JiraTypeMap(ITicketSource jiraProject, IAvailableTicketTypes availableTicketTypes)
     : this(jiraProject, availableTicketTypes, true)
 {
 }