public override void Process(CmdTrigger trigger) { try { string summary = "", description = ""; PageAttributes attributes = new PageAttributes(); bool notify = false; while (trigger.Args.HasNext) { var next = trigger.Args.NextModifiers(); switch (next) { case "s": case "summary": summary = trigger.Args.NextWord("\""); break; case "d": case "description": description = trigger.Args.NextWord("\""); break; case "a": case "attr": attributes.comment = trigger.Args.NextWord("\""); break; case "n": case "notify": notify = Convert.ToBoolean(trigger.Args.NextWord()); break; default: Console.WriteLine(trigger.Args.NextWord("\"")); break; } } trigger.Reply(TracBackend.CreateTicket(summary, description, attributes, notify)); } catch (Exception e) { // Error handling } }
public static int CreateTicket(string summary,string description,PageAttributes attr,bool notify=false) { return proxy.TicketCreate(summary, description, attr, notify); }