- /*
- * P4.Net *
- Copyright (c) 2007-2010 Shawn Hladky
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
- and associated documentation files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or
- substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
- using System;
- using System.Collections;
- using System.Text;
- namespace P4API
- {
- /// <summary>
- /// Provides output of a Perforce Command in "tagged" moded.
- /// </summary>
- /// <remarks>
- /// P4Recordset is an enumerable collection of P4Records that supply keyed access to
- /// information returned from Perforce.
- /// </remarks>
- public class P4RecordSet : P4BaseRecordSet, IEnumerable
- {
- internal P4RecordSet() { }
- private P4Record[] m_results;
- private P4Record[] _Results
- {
- get
- {
- if (m_results == null)
- {
- m_results = TaggedOutputs.ToArray();
- }
- return m_results;
- }
- }
- /// <summary>
- /// Gets an array of records returned from the Perforce command.
- /// </summary>
- /// <value>Array of P4Records.</value>
- public P4Record[] Records
- {
- get
- {
- return (P4Record[])_Results.Clone();
- }
- }
- /// <summary>
- /// Gets an array of string messages returned from the Perforce command.
- /// </summary>
- /// <value>Array of informational messages returned from a Perforce command.</value>
- public new string[] Messages
- {
- get
- {
- return (base.StringOutputs.ToArray());
- }
- }
- /// <summary>
- /// Gets the record at the specified index.
- /// </summary>
- /// <param name="Index">Index of the record to get.</param>
- /// <returns>P4Record</returns>
- /// <value>Returns the record at 'Index'.</value>
- public P4Record this[int Index] //Indexer
- {
- get
- {
- return _Results[Index];
- }
- }
- #region IEnumerable Members
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _Results.GetEnumerator();
- }
- #endregion
- }
- }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 7889 | Johan Nilsson | Branch from Shawn Hladky's original P4.Net (main branch). Changed file type for StandardT...est.cs and UnicodeTest.cs in order to be able to check them in. « |
14 years ago | |
//guest/shawn_hladky/P4.Net/main/src/P4API/P4RecordSet.cs | |||||
#6 | 7709 | Shawn Hladky | P4.Net: Cleanup, documentation, and a a start for implementing an object-based outpu...t for filelog. « | 15 years ago | |
#5 | 6505 | Shawn Hladky | P4.Net: Multiple Changes 1. Update samples to VS2008 and new bin paths 2.&nb...sp; Update MSBuild sync tasks to have IgnoredWarnings parameter 3. Added public class for P4RecordsetCallback. This allows consumers to easily migrate code that uses Recordsets to also take advantage of callback hooks. 4. Reworked method signiture of RunCallback. Removed tagged parameter and added RunCallbackUnparsed method. Made Callback parameter first so command and arguments are next to one-another. Note: this is a BREAKING CHANGE if you are using callbacks. 5. Reworked so switching between tagged and untagged runs will not disconnect/reconnect. 6. Add initial work for a file diffing object. « |
16 years ago | |
#4 | 6457 | Shawn Hladky | P4.Net: Added form_save overload to allow arbitrary arguments (primarily for -u flag on su...bmitted changelists) Added unit tests for Resolve workflow. Still need work on this and test partially fails. Updated some internal data structures to use generics Added documentation comments « |
17 years ago | |
#3 | 6102 | Shawn Hladky | P4.Net: Documentation. Fixed SetTicketFile bug. Added form processing with Sp...ecDef. Stubbed-out code for launching external merge tool, but is disabled since it's too difficult to use. « |
17 years ago | |
#2 | 5878 | Shawn Hladky | P4.Net: 1.0, support for raw spec processing. Update copyright. Fix bu...ild script. Bugs found along the way. « |
18 years ago | |
#1 | 5830 | Shawn Hladky | P4.Net: reorg to support release branches | 18 years ago | |
//guest/shawn_hladky/P4.Net/src/P4API/P4RecordSet.cs | |||||
#5 | 5824 | Shawn Hladky | P4.Net: Last bits of documentation for 0.9 | 18 years ago | |
#4 | 5812 | Shawn Hladky | P4.Net: More documentation. | 18 years ago | |
#3 | 5798 | Shawn Hladky | P4.Net... still not ready for beta Added license to all files Added several doc fi...les Misc bugs « |
18 years ago | |
#2 | 5774 | Shawn Hladky |
P4.Net. A few bug fixes. Addes first draft of MSBuild custom tasks. |
18 years ago | |
#1 | 5432 | Shawn Hladky | Refactoring step 2 -- rename source files | 19 years ago | |
//guest/shawn_hladky/P4.Net/src/P4API/P4TaggedResult.cs | |||||
#4 | 5431 | Shawn Hladky |
Refactoring... step 1. |
19 years ago | |
#3 | 5373 | Shawn Hladky | P4.Net: Still WIP, but some things starting to work | 19 years ago | |
#2 | 5362 | Shawn Hladky | Chipping away at the API changes | 19 years ago | |
#1 | 5349 | Shawn Hladky | Initial check-in for the new API interface. Nothing works yet, but it should compi...le at least. « |
19 years ago |