atlassian.net-sdk-v2.0 /Atlassian.Jira/ProjectVersionCollection.cs

Language C# Lines 36
MD5 Hash 8eb76ff1a7698850a2655b32313026c0 Estimated Cost $538 (why?)
Repository https://bitbucket.org/yyo/atlassian.net-sdk-v2.0.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Atlassian.Jira.Remote;

namespace Atlassian.Jira
{
    /// <summary>
    /// Collection of project versions
    /// </summary>
    public class ProjectVersionCollection: JiraNamedEntityCollection<ProjectVersion>    
    {
        internal ProjectVersionCollection(string fieldName, Jira jira, string projectKey)
            :this(fieldName, jira, projectKey, new List<ProjectVersion>())
        {
        }

        internal ProjectVersionCollection(string fieldName, Jira jira, string projectKey, IList<ProjectVersion> list)
            : base(fieldName, jira, projectKey, list)
        {
        }

        /// <summary>
        /// Add a version by name
        /// </summary>
        /// <param name="versionName">Version name</param>
        public void Add(string versionName)
        {
            this.Add(_jira.GetProjectVersions(_projectKey).First(v => v.Name.Equals(versionName, StringComparison.OrdinalIgnoreCase)));
        }


    }
}
Back to Top