本文整理汇总了C#中Issue类的典型用法代码示例。如果您正苦于以下问题:C# Issue类的具体用法?C# Issue怎么用?C# Issue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Issue类属于命名空间,在下文中一共展示了Issue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TesRestOfProperties
public void TesRestOfProperties()
{
var issue = new Issue();
var connector = new SonarRestService(new JsonSonarConnector());
var projectAsso = new Resource { Key = "proj" };
var model = new ExtensionDataModel(this.service, this.vshelper, null, null)
{
AssociatedProjectKey = "proj",
CommentData = "comment",
SelectedIssue = issue,
SonarInfo = "ver",
SelectedUser = new User { Login = "login" },
DiagnosticMessage = "MessageData",
DisableEditorTags = false,
RestService = connector,
AssociatedProject = projectAsso,
};
Assert.AreEqual("Selected Project: proj", model.AssociatedProjectKey);
Assert.AreEqual(issue, model.SelectedIssue);
Assert.AreEqual("comment", model.CommentData);
Assert.AreEqual("login", model.SelectedUser.Login);
Assert.AreEqual("ver", model.SonarInfo);
Assert.AreEqual("MessageData", model.DiagnosticMessage);
Assert.IsFalse(model.DisableEditorTags);
Assert.AreEqual(connector, model.RestService);
Assert.AreEqual(projectAsso, model.AssociatedProject);
}
开发者ID:kanchanachalla,项目名称:VSSonarQubeExtension,代码行数:28,代码来源:ModelPropertiesTest.cs
示例2: Parse
public static IEnumerable<Issue> Parse(string full)
{
if (string.IsNullOrEmpty(full))
return Enumerable.Empty<Issue>();
LinkedList<Issue> list = new LinkedList<Issue>();
JsonData data = JsonMapper.ToObject(full);
for (int i = 0; i < data.Count; i++)
{
Issue issue = new Issue();
issue.Id = (int)data[i]["number"];
issue.Summary = (string)data[i]["title"];
issue.Status = (string)data[i]["state"];
if (data[i]["assignee"] != null)
{
issue.Owner = (string)data[i]["assignee"]["login"];
}
if (data[i]["milestone"] != null)
{
issue.Milestone = (string)data[i]["milestone"]["title"];
}
issue.Status = (string)data[i]["state"];
list.AddLast(issue);
}
return list;
}
开发者ID:csware,项目名称:GurtleReloaded,代码行数:27,代码来源:IssueTableParser.cs
示例3: CommitForm
public CommitForm(Issue issue, int ticks, string Comment, int activityId, DateTime spentOn)
{
InitializeComponent();
LangTools.UpdateControlsForLanguage(this.Controls);
Text = Lang.CommitConfirmQuestion;
this.issue = issue;
this.ticks = ticks;
this.Comment = Comment;
this.activityId = activityId;
this.spentOn = spentOn;
labelProjectContent.Text = issue.Project.Name;
labelIssueContent.Text = String.Format("({0}) {1}", issue.Id, issue.Subject);
if (labelIssueContent.Size.Width > Size.Width - labelIssueContent.Location.X - 10)
this.Size = new Size(labelIssueContent.Location.X + labelIssueContent.Size.Width + 10, this.Size.Height);
ComboBoxActivity.DataSource = Enumerations.Activities;
ComboBoxActivity.DisplayMember = "Name";
ComboBoxActivity.ValueMember = "Id";
ComboBoxActivity.SelectedValue = activityId;
labelTimeContent.Text = String.Format("{0:0.##}", (double)ticks / 3600);
labelDateSpentContent.Text = spentOn.ToString(Lang.Culture.DateTimeFormat.ShortDatePattern);
TextBoxComment.Text = Comment;
if (RedmineClientForm.RedmineVersion < ApiVersion.V13x)
{
CheckBoxClosesIssue.Enabled = false;
CheckBoxClosesIssue.Visible = false;
}
}
开发者ID:Jopie64,项目名称:redmine-desktop-client,代码行数:33,代码来源:CommitForm.cs
示例4: BuildMessage_IssueCreatedThenUpdated_ExpectOneCreationMessage
public void BuildMessage_IssueCreatedThenUpdated_ExpectOneCreationMessage()
{
//Arrange
var jiraMessageBuilder = new JiraMessageBuilder("http://jira");
var user = new User {displayName = "Laurent Kempé", name = "laurent"};
var sameIssue = new Issue {key = "LK-10", fields = new Fields {summary = "Issue Description", reporter = user, assignee = user}};
var jiraModel1 = new JiraModel
{
webhookEvent = "jira:issue_created",
issue = sameIssue
};
var jiraModel2 = new JiraModel
{
webhookEvent = "jira:issue_updated",
issue = sameIssue
};
var sameJiraIssueKeyEvents = new List<JiraModel> { jiraModel1, jiraModel2 };
//Act
var buildMessage = jiraMessageBuilder.BuildMessage(sameJiraIssueKeyEvents);
//Assert
Assert.That(buildMessage, Is.EqualTo("<b><a href='http://jira/browse/LK-10'>LK-10 Issue Description</a></b> has been created by <a href='http://jira/secure/ViewProfile.jspa?name=laurent'>Laurent Kempé</a> and current assignee is <a href='http://jira/secure/ViewProfile.jspa?name=laurent'>Laurent Kempé</a>."));
}
开发者ID:martinskuta,项目名称:Nubot,代码行数:29,代码来源:JiraMessageBuilderTests.cs
示例5: RedmineIssueStorage
public RedmineIssueStorage(Issue issue) {
id = issue.Id;
tracker = issue.Tracker.Name;
subject = issue.Subject;
project = issue.Project.Name;
projectid = issue.Project.Id;
}
开发者ID:lanji,项目名称:GreenshotRedmineUploader,代码行数:7,代码来源:RedmineDataBuffer.cs
示例6: InitalizeMenu
/// <summary>
/// Initializes header menu.
/// </summary>
/// <param name="issue">Issue object</param>
protected void InitalizeMenu(Issue issue)
{
// Get newsletter
Newsletter news = NewsletterProvider.GetNewsletter(issue.IssueNewsletterID);
if (news == null)
{
return;
}
InitTabs(3, "newsletterIssueContent");
// Show only 'Send' tab for dynamic newsletter
if (news.NewsletterType == NewsletterType.Dynamic)
{
SetTab(0, GetString("Newsletter_Issue_Header.Send"), "Newsletter_Issue_Send.aspx?issueid=" + issue.IssueID, "SetHelpTopic('helpTopic', 'send_tab');");
// Set proper context help page
SetHelp("send_tab", "helpTopic");
}
else
{
// Show 'Edit' and 'Send' tabs only to authorized users
if (CMSContext.CurrentUser.IsAuthorizedPerResource("cms.newsletter", "authorissues"))
{
SetTab(0, GetString("General.Edit"), "Newsletter_Issue_Edit.aspx?issueid=" + issue.IssueID, "SetHelpTopic('helpTopic', 'edit_tab');");
SetTab(1, GetString("Newsletter_Issue_Header.Send"), "Newsletter_Issue_Send.aspx?issueid=" + issue.IssueID, "SetHelpTopic('helpTopic', 'send_tab');");
}
// Add 'Preview' tab
SetTab(2, GetString("Newsletter_Issue_Header.Preview"), "Newsletter_Issue_Preview.aspx?issueid=" + issue.IssueID, "SetHelpTopic('helpTopic', 'preview_tab');");
}
}
开发者ID:KuduApps,项目名称:Kentico,代码行数:35,代码来源:Newsletter_Issue_Header.aspx.cs
示例7: RedmineIssues_ShouldCreateIssue
public void RedmineIssues_ShouldCreateIssue()
{
Issue issue = new Issue();
issue.Project = new Project { Id = 10 };
issue.Tracker = new IdentifiableName { Id = 4 };
issue.Status = new IdentifiableName { Id = 5 };
issue.Priority = new IdentifiableName { Id = 8 };
issue.Subject = "Issue created using Rest API";
issue.Description = "Issue description...";
issue.Category = new IdentifiableName { Id = 11 };
issue.FixedVersion = new IdentifiableName { Id = 9 };
issue.AssignedTo = new IdentifiableName { Id = 8 };
issue.ParentIssue = new IdentifiableName { Id = 19 };
issue.CustomFields = new List<IssueCustomField>();
issue.CustomFields.Add(new IssueCustomField { Id = 13, Values = new List<CustomFieldValue> { new CustomFieldValue { Info = "Issue custom field completed" } } });
issue.IsPrivate = true;
issue.EstimatedHours = 12;
issue.StartDate = DateTime.Now;
issue.DueDate = DateTime.Now.AddMonths(1);
issue.Watchers = new List<Watcher>();
issue.Watchers.Add(new Watcher { Id = 8 });
issue.Watchers.Add(new Watcher { Id = 2 });
Issue savedIssue = redmineManager.CreateObject<Issue>(issue);
Assert.AreEqual(issue.Subject, savedIssue.Subject);
}
开发者ID:ANovitsky,项目名称:redmine-net-api,代码行数:28,代码来源:IssueTests.cs
示例8: Issues_Validate
partial void Issues_Validate(Issue entity, EntitySetValidationResultsBuilder results)
{
if (entity.TargetResolutionDate != null & entity.DateRaised != null)
{
if (entity.TargetResolutionDate < entity.DateRaised)
{
results.AddEntityError("The target date cannot be earlier than the date raised");
}
}
if (entity.TargetResolutionDate != null & entity.CorrectiveActionCompletionTargetDate != null)
{
if (entity.TargetResolutionDate < entity.CorrectiveActionCompletionTargetDate)
{
results.AddEntityError("The corrective action must be completed on or before the target resolution date");
}
}
if (entity.TargetResolutionDate != null & entity.PreventativeActionCompletionTargetDate != null)
{
if (entity.TargetResolutionDate < entity.PreventativeActionCompletionTargetDate)
{
results.AddEntityError("The preventative action must be completed on or before the target resolution date");
}
}
}
开发者ID:jlsfernandez,项目名称:IssueManager,代码行数:26,代码来源:_ApplicationDataService.lsml.cs
示例9: LogMessage
public static void LogMessage(string message, Issue.IssueLevel issueLevel)
{
try
{
ShowMessage(string.Format("{0}: {1}", issueLevel, message), ConsoleColor.Blue);
switch(issueLevel)
{
case Issue.IssueLevel.Error:
ShowMessage(message, ConsoleColor.Red);
Trace.TraceError(message);
RegisterMessageAsync(message, issueLevel);
break;
case Issue.IssueLevel.Warning:
ShowMessage(message, ConsoleColor.Yellow);
Trace.TraceWarning(message);
RegisterMessageAsync(message, issueLevel);
break;
case Issue.IssueLevel.Information:
ShowMessage(message, ConsoleColor.Green);
Trace.TraceInformation(message);
//RegisterMessageAsync(message, issueLevel); //This will be too much and of no value to the support service.
break;
default:
throw new ArgumentOutOfRangeException(string.Format("Unknown issuelevel {0}.", issueLevel));
}
}
catch (Exception exp)
{
ShowMessage(exp.Message, ConsoleColor.DarkMagenta);
}
}
开发者ID:poxet,项目名称:Rubicon-Reverse-Proxy,代码行数:32,代码来源:LogHelper.cs
示例10: TaskModel
public TaskModel(ISourceControl sourceControl, IIssuesTracking issuesTracking, IRepositoryFactory repositoryFactory, Issue issue)
{
_sourceControl = sourceControl;
_issuesTracking = issuesTracking;
_repositoryFactory = repositoryFactory;
Issue = issue;
}
开发者ID:Celdorfpwn,项目名称:ASAP,代码行数:7,代码来源:TaskModel.cs
示例11: RedmineAttachments_ShouldUploadAttachment
public void RedmineAttachments_ShouldUploadAttachment()
{
//read document from specified path
string documentPath = "E:\\uploadAttachment.txt";
byte[] documentData = File.ReadAllBytes(documentPath);
//upload attachment to redmine
Upload attachment = redmineManager.UploadFile(documentData);
//set attachment properties
attachment.FileName = "AttachmentUploaded.txt";
attachment.Description = "File uploaded using REST API";
attachment.ContentType = "text/plain";
//create list of attachments to be added to issue
IList<Upload> attachments = new List<Upload>();
attachments.Add(attachment);
//read document from specified path
documentPath = "E:\\uploadAttachment1.txt";
documentData = File.ReadAllBytes(documentPath);
//upload attachment to redmine
Upload attachment1 = redmineManager.UploadFile(documentData);
//set attachment properties
attachment1.FileName = "AttachmentUploaded1.txt";
attachment1.Description = "Second file uploaded";
attachment1.ContentType = "text/plain";
attachments.Add(attachment1);
Issue issue = new Issue();
issue.Project = new Project { Id = 10 };
issue.Tracker = new IdentifiableName { Id = 4 };
issue.Status = new IdentifiableName { Id = 5 };
issue.Priority = new IdentifiableName { Id = 8 };
issue.Subject = "Issue with attachments";
issue.Description = "Issue description...";
issue.Category = new IdentifiableName { Id = 11 };
issue.FixedVersion = new IdentifiableName { Id = 9 };
issue.AssignedTo = new IdentifiableName { Id = 8 };
issue.ParentIssue = new IdentifiableName { Id = 19 };
issue.CustomFields = new List<IssueCustomField>();
issue.CustomFields.Add(new IssueCustomField { Id = 13, Values = new List<CustomFieldValue> { new CustomFieldValue { Info = "Issue custom field completed" } } });
issue.IsPrivate = true;
issue.EstimatedHours = 12;
issue.StartDate = DateTime.Now;
issue.DueDate = DateTime.Now.AddMonths(1);
issue.Uploads = attachments;
issue.Watchers = new List<Watcher>();
issue.Watchers.Add(new Watcher { Id = 8 });
issue.Watchers.Add(new Watcher { Id = 2 });
//create issue and attach document
Issue issueWithAttachment = redmineManager.CreateObject<Issue>(issue);
issue = redmineManager.GetObject<Issue>(issueWithAttachment.Id.ToString(), new NameValueCollection { { "include", "attachments" } });
Assert.IsTrue(issue.Attachments.Count == 2 && issue.Attachments[0].FileName == attachment.FileName);
}
开发者ID:ANovitsky,项目名称:redmine-net-api,代码行数:60,代码来源:AttachmentTests.cs
示例12: UpdateIssue
public void UpdateIssue()
{
int projectId = FirstProjectId;
string originalSummary = GetRandomSummary();
string newSummary = GetRandomSummary();
string originalDescription = GetRandomDescription();
string newDescription = GetRandomDescription();
Issue issue = new Issue();
issue.Project = new ObjectRef( projectId );
issue.Summary = originalSummary;
issue.Description = originalDescription;
issue.Category = new ObjectRef( GetFirstCategory( projectId ) );
int issueId = Session.Request.IssueAdd( issue );
try
{
Issue issueToUpdate = Session.Request.IssueGet(issueId);
issueToUpdate.Summary = newSummary;
issueToUpdate.Description = newDescription;
Session.Request.IssueUpdate(issueToUpdate);
Issue updatedIssue = Session.Request.IssueGet(issueId);
Assert.AreEqual(newSummary, updatedIssue.Summary);
Assert.AreEqual(newDescription, updatedIssue.Description);
}
finally
{
Session.Request.IssueDelete(issueId);
}
}
开发者ID:mantishub,项目名称:MantisDotNetClient,代码行数:34,代码来源:UpdateIssues.cs
示例13: 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;
}
开发者ID:sumanta-mondal,项目名称:Voice2Redmine,代码行数:27,代码来源:IssueCreating.cs
示例14: CreateDetailTransactionsForErrorCorrection
public void CreateDetailTransactionsForErrorCorrection(Order order, BLL.PickList picklist,
Issue stvLog, int receiptPalletId, int receiptID, User user, DateTime convertedEthDate
, int newItemId, int newUnitId, int newManufacturerId, decimal pickedPack
, decimal Convertedpack, int confirmationStatusId, bool changeExpiryDate
, DateTime? ExpiryDate, bool changeBatchNo, string batchNo)
{
//Load the ReceivePallet First From that we Get the Information that We need
ReceivePallet receivePalletOriginal = new ReceivePallet();
receivePalletOriginal.LoadByPrimaryKey(receiptPalletId);
ReceiveDoc receiveDocOriginal = new ReceiveDoc();
receiveDocOriginal.LoadByPrimaryKey(receivePalletOriginal.ReceiveID);
//Load ItemUnit Detail for For ItemUnit Change;
ItemUnit newItemUnit = new ItemUnit();
newItemUnit.LoadByPrimaryKey(newUnitId);
// Generate PicklistDetail With OrderDetail information
PickListService pickListService = new PickListService();
PickListDetail pickListDetail = pickListService.CreatePicklistDetailWithOrder(receiveDocOriginal, receivePalletOriginal, order, picklist,
pickedPack);
// Generate IssueDoc from picklistDetail and substract the quantity from receiveDoc
IssueService issueService = new IssueService();
issueService.CreateIssueFromPicklist(pickListDetail, order, convertedEthDate, stvLog, user);
if (Convertedpack > 0)
{
//duplicate The ReceiveDoc and ReceiptPallet
ReceiveService receiveService = new ReceiveService();
receiveService.CloneReceiveForErrorCorrection(confirmationStatusId, receivePalletOriginal, receiveDocOriginal
, Convertedpack, user, newItemId
, receiveDocOriginal.StoreID, receiptID
, newManufacturerId, newItemUnit, convertedEthDate,changeExpiryDate,ExpiryDate,changeBatchNo,batchNo);
}
}
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:35,代码来源:TransferService.cs
示例15: CadastrarIssue
public ExcelIssue CadastrarIssue(ExcelIssue atualExcelIssue, bool atualizarProjetoExistente)
{
Issue issueLoaded = null;
Issue issueNew;
Issue issueToSave = null;
issueNew = new Issue
{
Id = atualExcelIssue.IdRedmine,
Subject = atualExcelIssue.Subject,
EstimatedHours = atualExcelIssue.EstimatedHours,
StartDate = atualExcelIssue.StartDate,
DueDate = atualExcelIssue.DueDate,
AssignedTo = new IdentifiableName { Id = atualExcelIssue.AssigneeId },
Tracker = new IdentifiableName { Id = atualExcelIssue.TrackerId },
Project = new IdentifiableName { Id = atualExcelIssue.ProjectId },
ParentIssue = atualExcelIssue.ParentExcelIssue != null && atualExcelIssue.ParentExcelIssue.IdRedmine != 0 ?
new IdentifiableName { Id = atualExcelIssue.ParentExcelIssue.IdRedmine } : null
};
if (atualizarProjetoExistente && atualExcelIssue.IdRedmine != 0)
{
try
{
issueLoaded = manager.GetObject<Issue>(atualExcelIssue.IdRedmine.ToString(), null);
issueToSave = AtualizarSomenteModificacoes(issueLoaded, issueNew);
}
catch(RedmineException rex)
{
Console.WriteLine("Mensagem de erro do sistema ao tentar carregar a Issue Id " + atualExcelIssue.IdRedmine.ToString() + ": " + rex.Message);
throw new Exception("O ID da Issue/Atividade sendo atualizada não foi encontrada no Redmine!");
}
}
else
issueToSave = issueNew;
try
{
if (!atualizarProjetoExistente)
{
issueToSave = manager.CreateObject(issueToSave);
atualExcelIssue.IdRedmine = issueToSave.Id;
}
else if (issueToSave.Id != 0)
manager.UpdateObject(issueToSave.Id.ToString(), issueToSave);
}
catch(RedmineException rex)
{
if (rex.Message.Contains("Tracker is not included in the list"))
{
throw new Exception("Tracker Not Found");
}
else {
throw rex;
}
}
return atualExcelIssue;
}
开发者ID:andretode,项目名称:ImportTaskRedmine,代码行数:59,代码来源:RedmineServices.cs
示例16: Post
public async Task<HttpResponseMessage> Post(Issue issue)
{
HttpResponseMessage response = null;
await _service.CreateIssue(
issue.CreatedBy,
item => response = Request.CreateResponse(HttpStatusCode.Created, new {Uri = string.Format("/Issues/{0}", item.IssueId)}));
return response;
}
开发者ID:paulhoulston,项目名称:IssueTracker,代码行数:8,代码来源:CreateIssueController.cs
示例17: AttachScreenShot
public static void AttachScreenShot(Issue issue, Image img)
{
if (img != null)
{
issue.AddAttachment("screenshot.png", ConvertImage(img));
}
issue.SaveChanges();
}
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:8,代码来源:JiraHelper.cs
示例18: AddCustomFieldToIssue
public void AddCustomFieldToIssue(Issue issue, string fieldName, string value)
{
var issueToUpdate = _instance.GetIssue(issue.Key.ToString());
issueToUpdate[fieldName] = value;
issueToUpdate.SaveChanges();
}
开发者ID:shortstacked,项目名称:QA-Orchestrator,代码行数:8,代码来源:Jira.cs
示例19: ClientIssueRelation
public ClientIssueRelation(IssueRelation relation, Issue issueTo)
{
this.Id = relation.Id;
this.IssueId = relation.IssueId;
this.IssueToId = relation.IssueToId;
this.Type = relation.Type;
this.issueTo = issueTo;
}
开发者ID:forestail,项目名称:redmine-desktop-client,代码行数:8,代码来源:IssueForm.cs
示例20: Create
public ActionResult Create(Issue issue)
{
string imageData = Request.Form.Get("image");
issue.Images.Add(imageData);
DocumentSession.Store(issue);
DocumentSession.SaveChanges();
return Json(issue);
}
开发者ID:jsannerstedt,项目名称:TeamExplorer,代码行数:8,代码来源:IssueController.cs
注:本文中的Issue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论