using System;
using System.Collections;
using System.Text;
namespace P4API
{
///
/// Provides the output of a Perforce Command in "tagged" moded.
///
///
///
/// get
/// {
/// if (m_results == null)
/// {
/// m_results = (P4Record[])TaggedOutputs.ToArray(typeof(P4Record));
/// }
/// return m_results;
/// }
///
///
///
/// Shawn Was Here
///
public class P4RecordSet : P4BaseRecordSet, IEnumerable
{
internal P4RecordSet() { }
private P4Record[] m_results;
private P4Record[] _Results
{
get
{
if (m_results == null)
{
m_results = (P4Record[])TaggedOutputs.ToArray(typeof(P4Record));
}
return m_results;
}
}
public P4Record[] Records
{
get
{
return (P4Record[])_Results.Clone();
}
}
public string[] Messages
{
get
{
return (string[])base.StringOutputs.ToArray(typeof(string));
}
}
public P4Record this[int Index] //Indexer
{
get
{
return _Results[Index];
}
}
#region IEnumerable Members
IEnumerator IEnumerable.GetEnumerator()
{
return _Results.GetEnumerator();
}
#endregion
}
}