using System; using System.Text; namespace P4API { public class P4PendingChangelist { private P4Connection _p4 = null; internal P4Form baseForm; internal P4PendingChangelist(string Description, P4Connection p4) { _p4 = p4; baseForm = _p4.Fetch_Form("change"); // clear the Jobs list string [] NullList = {}; baseForm.ArrayFields["Jobs"] = NullList; // clear the Files list baseForm.ArrayFields["Files"] = NullList; // save the description baseForm.Fields["Description"] = Description; P4UnParsedRecordSet r = _p4.Save_Form(baseForm); if (!r.HasErrors()) { // convert to int to verify we're parsing correctly int changeNumber = int.Parse(r.Messages[0].Split(' ')[1]); baseForm.Fields["Change"] = changeNumber.ToString(); } } /// <summary> /// Gets the pending changelist's number. /// </summary> /// <value>The number.</value> public int Number { get { return int.Parse(baseForm.Fields["Change"]); } } /// <summary> /// Gets the pending changelist's description. /// </summary> /// <value>The description.</value> public string Description { get { return baseForm.Fields["Description"]; } } public P4UnParsedRecordSet Submit() { return _p4.RunUnParsed("submit", "-c", Number.ToString()); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 5830 | Shawn Hladky | P4.Net: reorg to support release branches | ||
#6 | 5824 | Shawn Hladky | P4.Net: Last bits of documentation for 0.9 | ||
#5 | 5812 | Shawn Hladky | P4.Net: More documentation. | ||
#4 | 5798 | Shawn Hladky |
P4.Net... still not ready for beta Added license to all files Added several doc files Misc bugs |
||
#3 | 5636 | Shawn Hladky |
1. Added test harness framework, and some initial tests 2. Fixed many bugs (oddly enough identified by the unit tests) 3. Fixes so will build 1.1 Framework (and build batch files actually work) 4. Pathetic attempt at documentation |
||
#2 | 5438 | Shawn Hladky | refactoring, and documentation code | ||
#1 | 5436 | Shawn Hladky | P4.Net -- Added some high-level functionality |