本文整理汇总了C#中RedmineManager.GetObjectList方法的典型用法代码示例。如果您正苦于以下问题:C# RedmineManager.GetObjectList方法的具体用法?C# RedmineManager.GetObjectList怎么用?C# RedmineManager.GetObjectList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RedmineManager
的用法示例。
在下文中一共展示了RedmineManager.GetObjectList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public bool Create()
{
try
{
RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
Configuration.RedmineUser, Configuration.RedminePassword);
//Create a issue.
var newIssue = new Issue
{
Subject = Title,
Description = Description,
Project = new IdentifiableName() { Id = ProjectId },
Tracker = new IdentifiableName() { Id = TrackerId }
};
User thisuser = (from u in manager.GetObjectList<User>(new System.Collections.Specialized.NameValueCollection())
where u.Login == Configuration.RedmineUser
select u).FirstOrDefault();
if (thisuser != null)
newIssue.AssignedTo = new IdentifiableName() { Id = thisuser.Id };
manager.CreateObject(newIssue);
}
catch { return false; }
return true;
}
示例2: GetTrackers
public static Dictionary<string, int> GetTrackers()
{
RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
Configuration.RedmineUser, Configuration.RedminePassword);
Dictionary<string, int> Trackers = new Dictionary<string, int>();
foreach (Tracker track in manager.GetObjectList<Tracker>(new NameValueCollection()))
{
Trackers.Add(track.Name, track.Id);
}
return Trackers;
}
示例3: GetProjects
public static Dictionary<string, int> GetProjects()
{
RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
Configuration.RedmineUser, Configuration.RedminePassword);
Dictionary<string, int> Projects = new Dictionary<string, int>();
foreach (Project proj in manager.GetObjectList<Project>(new NameValueCollection()))
{
Projects.Add(proj.Name, proj.Id);
}
return Projects;
}
示例4: button_Click
private void button_Click(object sender, RoutedEventArgs e)
{
JasonInformations info = new JasonInformations();
var manager = new RedmineManager(info.host, textBoxUser.Text, passwordBox.Password);
var parameters = new NameValueCollection { { "status_id", "*" }, { "limit", "100" } };
try
{
var test = manager.GetObjectList<Issue>(parameters).ToList();
MainWindow win2 = new MainWindow();
win2.manager = manager;
win2.subject = info.subject;
win2.list = test;
win2.info = info.destinatari;
win2.Show();
this.Close();
}
catch (Exception )
{
labelErrore.Visibility = Visibility.Visible;
this.Show();
}
}
示例5: connectRedmine
private Boolean connectRedmine(String url)
{
try
{
var parameters = new NameValueCollection { { "name", "*" } };
redmine = new RedmineManager(url, parser.apiKey);
redmine.GetObjectList<Project>(parameters);
return true;
}
catch (RedmineException error)
{
Console.WriteLine(error);
return false;
}
}