This commit is contained in:
commit
47711d616e
2644 changed files with 479454 additions and 0 deletions
53
Scripts/Engines/Reports/Objects/Reports/ItemValue.cs
Normal file
53
Scripts/Engines/Reports/Objects/Reports/ItemValue.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
public class ItemValue : PersistableObject
|
||||
{
|
||||
#region Type Identification
|
||||
public static readonly PersistableType ThisTypeID = new PersistableType( "iv", new ConstructCallback( Construct ) );
|
||||
|
||||
private static PersistableObject Construct()
|
||||
{
|
||||
return new ItemValue();
|
||||
}
|
||||
|
||||
public override PersistableType TypeID{ get{ return ThisTypeID; } }
|
||||
#endregion
|
||||
|
||||
private string m_Value;
|
||||
private string m_Format;
|
||||
|
||||
public string Value{ get{ return m_Value; } set{ m_Value = value; } }
|
||||
public string Format{ get{ return m_Format; } set{ m_Format = value; } }
|
||||
|
||||
private ItemValue()
|
||||
{
|
||||
}
|
||||
|
||||
public ItemValue( string value ) : this( value, null )
|
||||
{
|
||||
}
|
||||
|
||||
public ItemValue( string value, string format )
|
||||
{
|
||||
m_Value = value;
|
||||
m_Format = format;
|
||||
}
|
||||
|
||||
public override void SerializeAttributes( PersistanceWriter op )
|
||||
{
|
||||
op.SetString( "v", m_Value );
|
||||
op.SetString( "f", m_Format );
|
||||
}
|
||||
|
||||
public override void DeserializeAttributes( PersistanceReader ip )
|
||||
{
|
||||
m_Value = ip.GetString( "v" );
|
||||
m_Format = Utility.Intern( ip.GetString( "f" ) );
|
||||
|
||||
if ( m_Format == null )
|
||||
Utility.Intern( ref m_Value );
|
||||
}
|
||||
}
|
||||
}
|
||||
210
Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs
Normal file
210
Scripts/Engines/Reports/Objects/Reports/ItemValueCollection.cs
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version: 1.1.4322.573
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed collection of Server.Engines.Reports.ItemValue.
|
||||
/// </summary>
|
||||
public class ItemValueCollection : System.Collections.CollectionBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public ItemValueCollection() :
|
||||
base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Server.Engines.Reports.ItemValue at a specific position in the ItemValueCollection.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ItemValue this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((Server.Engines.Reports.ItemValue)(this.List[index]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this.List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Add( string value )
|
||||
{
|
||||
return Add( new ItemValue( value ) );
|
||||
}
|
||||
|
||||
public int Add( string value, string format )
|
||||
{
|
||||
return Add( new ItemValue( value, format ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a Server.Engines.Reports.ItemValue entry to this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ItemValue instance.</param>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
public int Add(Server.Engines.Reports.ItemValue value)
|
||||
{
|
||||
return this.List.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a specified Server.Engines.Reports.ItemValue instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ItemValue instance to search for.</param>
|
||||
/// <returns>True if the Server.Engines.Reports.ItemValue instance is in the collection; otherwise false.</returns>
|
||||
public bool Contains(Server.Engines.Reports.ItemValue value)
|
||||
{
|
||||
return this.List.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the index a specified Server.Engines.Reports.ItemValue instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ItemValue instance to find.</param>
|
||||
/// <returns>The zero-based index of the specified Server.Engines.Reports.ItemValue instance. If the object is not found, the return value is -1.</returns>
|
||||
public int IndexOf(Server.Engines.Reports.ItemValue value)
|
||||
{
|
||||
return this.List.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a specified Server.Engines.Reports.ItemValue instance from this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">The Server.Engines.Reports.ItemValue instance to remove.</param>
|
||||
public void Remove(Server.Engines.Reports.ItemValue value)
|
||||
{
|
||||
this.List.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an enumerator that can iterate through the Server.Engines.Reports.ItemValue instance.
|
||||
/// </summary>
|
||||
/// <returns>An Server.Engines.Reports.ItemValue's enumerator.</returns>
|
||||
public new ItemValueCollectionEnumerator GetEnumerator()
|
||||
{
|
||||
return new ItemValueCollectionEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert a Server.Engines.Reports.ItemValue instance into this collection at a specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">Zero-based index.</param>
|
||||
/// <param name="value">The Server.Engines.Reports.ItemValue instance to insert.</param>
|
||||
public void Insert(int index, Server.Engines.Reports.ItemValue value)
|
||||
{
|
||||
this.List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed enumerator of Server.Engines.Reports.ItemValue.
|
||||
/// </summary>
|
||||
public class ItemValueCollectionEnumerator : System.Collections.IEnumerator
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Current index
|
||||
/// </summary>
|
||||
private int _index;
|
||||
|
||||
/// <summary>
|
||||
/// Current element pointed to.
|
||||
/// </summary>
|
||||
private Server.Engines.Reports.ItemValue _currentElement;
|
||||
|
||||
/// <summary>
|
||||
/// Collection to enumerate.
|
||||
/// </summary>
|
||||
private ItemValueCollection _collection;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for enumerator.
|
||||
/// </summary>
|
||||
/// <param name="collection">Instance of the collection to enumerate.</param>
|
||||
internal ItemValueCollectionEnumerator(ItemValueCollection collection)
|
||||
{
|
||||
_index = -1;
|
||||
_collection = collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Server.Engines.Reports.ItemValue object in the enumerated ItemValueCollection currently indexed by this instance.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ItemValue Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current element in the collection.
|
||||
/// </summary>
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the cursor, so it points to the beginning of the enumerator.
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
_index = -1;
|
||||
_currentElement = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advances the enumerator to the next queue of the enumeration, if one is currently available.
|
||||
/// </summary>
|
||||
/// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
|
||||
public bool MoveNext()
|
||||
{
|
||||
if ((_index
|
||||
< (_collection.Count - 1)))
|
||||
{
|
||||
_index = (_index + 1);
|
||||
_currentElement = this._collection[_index];
|
||||
return true;
|
||||
}
|
||||
_index = _collection.Count;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Engines/Reports/Objects/Reports/Report.cs
Normal file
74
Scripts/Engines/Reports/Objects/Reports/Report.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
public class Report : PersistableObject
|
||||
{
|
||||
#region Type Identification
|
||||
public static readonly PersistableType ThisTypeID = new PersistableType( "rp", new ConstructCallback( Construct ) );
|
||||
|
||||
private static PersistableObject Construct()
|
||||
{
|
||||
return new Report();
|
||||
}
|
||||
|
||||
public override PersistableType TypeID{ get{ return ThisTypeID; } }
|
||||
#endregion
|
||||
|
||||
private string m_Name;
|
||||
private string m_Width;
|
||||
private ReportColumnCollection m_Columns;
|
||||
private ReportItemCollection m_Items;
|
||||
|
||||
public string Name{ get{ return m_Name; } set{ m_Name = value; } }
|
||||
public string Width{ get{ return m_Width; } set{ m_Width = value; } }
|
||||
public ReportColumnCollection Columns{ get{ return m_Columns; } }
|
||||
public ReportItemCollection Items{ get{ return m_Items; } }
|
||||
|
||||
private Report() : this( null, null )
|
||||
{
|
||||
}
|
||||
|
||||
public Report( string name, string width )
|
||||
{
|
||||
m_Name = name;
|
||||
m_Width = width;
|
||||
m_Columns = new ReportColumnCollection();
|
||||
m_Items = new ReportItemCollection();
|
||||
}
|
||||
|
||||
public override void SerializeAttributes( PersistanceWriter op )
|
||||
{
|
||||
op.SetString( "n", m_Name );
|
||||
op.SetString( "w", m_Width );
|
||||
}
|
||||
|
||||
public override void DeserializeAttributes( PersistanceReader ip )
|
||||
{
|
||||
m_Name = Utility.Intern( ip.GetString( "n" ) );
|
||||
m_Width = Utility.Intern( ip.GetString( "w" ) );
|
||||
}
|
||||
|
||||
public override void SerializeChildren( PersistanceWriter op )
|
||||
{
|
||||
for ( int i = 0; i < m_Columns.Count; ++i )
|
||||
m_Columns[i].Serialize( op );
|
||||
|
||||
for ( int i = 0; i < m_Items.Count; ++i )
|
||||
m_Items[i].Serialize( op );
|
||||
}
|
||||
|
||||
public override void DeserializeChildren( PersistanceReader ip )
|
||||
{
|
||||
while ( ip.HasChild )
|
||||
{
|
||||
PersistableObject child = ip.GetChild();
|
||||
|
||||
if ( child is ReportColumn )
|
||||
m_Columns.Add( (ReportColumn) child );
|
||||
else if ( child is ReportItem )
|
||||
m_Items.Add( (ReportItem) child );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs
Normal file
55
Scripts/Engines/Reports/Objects/Reports/ReportColumn.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
public class ReportColumn : PersistableObject
|
||||
{
|
||||
#region Type Identification
|
||||
public static readonly PersistableType ThisTypeID = new PersistableType( "rc", new ConstructCallback( Construct ) );
|
||||
|
||||
private static PersistableObject Construct()
|
||||
{
|
||||
return new ReportColumn();
|
||||
}
|
||||
|
||||
public override PersistableType TypeID{ get{ return ThisTypeID; } }
|
||||
#endregion
|
||||
|
||||
private string m_Width;
|
||||
private string m_Align;
|
||||
private string m_Name;
|
||||
|
||||
public string Width{ get{ return m_Width; } set{ m_Width = value; } }
|
||||
public string Align{ get{ return m_Align; } set{ m_Align = value; } }
|
||||
public string Name{ get{ return m_Name; } set{ m_Name = value; } }
|
||||
|
||||
private ReportColumn()
|
||||
{
|
||||
}
|
||||
|
||||
public ReportColumn( string width, string align ) : this( width, align, null )
|
||||
{
|
||||
}
|
||||
|
||||
public ReportColumn( string width, string align, string name )
|
||||
{
|
||||
m_Width = width;
|
||||
m_Align = align;
|
||||
m_Name = name;
|
||||
}
|
||||
|
||||
public override void SerializeAttributes( PersistanceWriter op )
|
||||
{
|
||||
op.SetString( "w", m_Width );
|
||||
op.SetString( "a", m_Align );
|
||||
op.SetString( "n", m_Name );
|
||||
}
|
||||
|
||||
public override void DeserializeAttributes( PersistanceReader ip )
|
||||
{
|
||||
m_Width = Utility.Intern( ip.GetString( "w" ) );
|
||||
m_Align = Utility.Intern( ip.GetString( "a" ) );
|
||||
m_Name = Utility.Intern( ip.GetString( "n" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version: 1.1.4322.573
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed collection of Server.Engines.Reports.ReportColumn.
|
||||
/// </summary>
|
||||
public class ReportColumnCollection : System.Collections.CollectionBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public ReportColumnCollection() :
|
||||
base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Server.Engines.Reports.ReportColumn at a specific position in the ReportColumnCollection.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ReportColumn this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((Server.Engines.Reports.ReportColumn)(this.List[index]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this.List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Add( string width, string align )
|
||||
{
|
||||
return Add( new ReportColumn( width, align ) );
|
||||
}
|
||||
|
||||
public int Add( string width, string align, string name )
|
||||
{
|
||||
return Add( new ReportColumn( width, align, name ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a Server.Engines.Reports.ReportColumn entry to this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportColumn instance.</param>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
public int Add(Server.Engines.Reports.ReportColumn value)
|
||||
{
|
||||
return this.List.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a specified Server.Engines.Reports.ReportColumn instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportColumn instance to search for.</param>
|
||||
/// <returns>True if the Server.Engines.Reports.ReportColumn instance is in the collection; otherwise false.</returns>
|
||||
public bool Contains(Server.Engines.Reports.ReportColumn value)
|
||||
{
|
||||
return this.List.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the index a specified Server.Engines.Reports.ReportColumn instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportColumn instance to find.</param>
|
||||
/// <returns>The zero-based index of the specified Server.Engines.Reports.ReportColumn instance. If the object is not found, the return value is -1.</returns>
|
||||
public int IndexOf(Server.Engines.Reports.ReportColumn value)
|
||||
{
|
||||
return this.List.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a specified Server.Engines.Reports.ReportColumn instance from this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">The Server.Engines.Reports.ReportColumn instance to remove.</param>
|
||||
public void Remove(Server.Engines.Reports.ReportColumn value)
|
||||
{
|
||||
this.List.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an enumerator that can iterate through the Server.Engines.Reports.ReportColumn instance.
|
||||
/// </summary>
|
||||
/// <returns>An Server.Engines.Reports.ReportColumn's enumerator.</returns>
|
||||
public new ReportColumnCollectionEnumerator GetEnumerator()
|
||||
{
|
||||
return new ReportColumnCollectionEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert a Server.Engines.Reports.ReportColumn instance into this collection at a specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">Zero-based index.</param>
|
||||
/// <param name="value">The Server.Engines.Reports.ReportColumn instance to insert.</param>
|
||||
public void Insert(int index, Server.Engines.Reports.ReportColumn value)
|
||||
{
|
||||
this.List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed enumerator of Server.Engines.Reports.ReportColumn.
|
||||
/// </summary>
|
||||
public class ReportColumnCollectionEnumerator : System.Collections.IEnumerator
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Current index
|
||||
/// </summary>
|
||||
private int _index;
|
||||
|
||||
/// <summary>
|
||||
/// Current element pointed to.
|
||||
/// </summary>
|
||||
private Server.Engines.Reports.ReportColumn _currentElement;
|
||||
|
||||
/// <summary>
|
||||
/// Collection to enumerate.
|
||||
/// </summary>
|
||||
private ReportColumnCollection _collection;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for enumerator.
|
||||
/// </summary>
|
||||
/// <param name="collection">Instance of the collection to enumerate.</param>
|
||||
internal ReportColumnCollectionEnumerator(ReportColumnCollection collection)
|
||||
{
|
||||
_index = -1;
|
||||
_collection = collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Server.Engines.Reports.ReportColumn object in the enumerated ReportColumnCollection currently indexed by this instance.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ReportColumn Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current element in the collection.
|
||||
/// </summary>
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the cursor, so it points to the beginning of the enumerator.
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
_index = -1;
|
||||
_currentElement = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advances the enumerator to the next queue of the enumeration, if one is currently available.
|
||||
/// </summary>
|
||||
/// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
|
||||
public bool MoveNext()
|
||||
{
|
||||
if ((_index
|
||||
< (_collection.Count - 1)))
|
||||
{
|
||||
_index = (_index + 1);
|
||||
_currentElement = this._collection[_index];
|
||||
return true;
|
||||
}
|
||||
_index = _collection.Count;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Engines/Reports/Objects/Reports/ReportItem.cs
Normal file
39
Scripts/Engines/Reports/Objects/Reports/ReportItem.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
public class ReportItem : PersistableObject
|
||||
{
|
||||
#region Type Identification
|
||||
public static readonly PersistableType ThisTypeID = new PersistableType( "ri", new ConstructCallback( Construct ) );
|
||||
|
||||
private static PersistableObject Construct()
|
||||
{
|
||||
return new ReportItem();
|
||||
}
|
||||
|
||||
public override PersistableType TypeID{ get{ return ThisTypeID; } }
|
||||
#endregion
|
||||
|
||||
private ItemValueCollection m_Values;
|
||||
|
||||
public ItemValueCollection Values{ get{ return m_Values; } }
|
||||
|
||||
public ReportItem()
|
||||
{
|
||||
m_Values = new ItemValueCollection();
|
||||
}
|
||||
|
||||
public override void SerializeChildren( PersistanceWriter op )
|
||||
{
|
||||
for ( int i = 0; i < m_Values.Count; ++i )
|
||||
m_Values[i].Serialize( op );
|
||||
}
|
||||
|
||||
public override void DeserializeChildren( PersistanceReader ip )
|
||||
{
|
||||
while ( ip.HasChild )
|
||||
m_Values.Add( ip.GetChild() as ItemValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
215
Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs
Normal file
215
Scripts/Engines/Reports/Objects/Reports/ReportItemCollection.cs
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version: 1.1.4322.573
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed collection of Server.Engines.Reports.ReportItem.
|
||||
/// </summary>
|
||||
public class ReportItemCollection : System.Collections.CollectionBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public ReportItemCollection() :
|
||||
base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Server.Engines.Reports.ReportItem at a specific position in the ReportItemCollection.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ReportItem this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((Server.Engines.Reports.ReportItem)(this.List[index]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this.List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Add( string name, object value )
|
||||
{
|
||||
return Add( name, value, null );
|
||||
}
|
||||
|
||||
public int Add( string name, object value, string format )
|
||||
{
|
||||
ReportItem item = new ReportItem();
|
||||
|
||||
item.Values.Add( name );
|
||||
item.Values.Add( value == null ? "" : value.ToString(), format );
|
||||
|
||||
return Add( item );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a Server.Engines.Reports.ReportItem entry to this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportItem instance.</param>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
public int Add(Server.Engines.Reports.ReportItem value)
|
||||
{
|
||||
return this.List.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether a specified Server.Engines.Reports.ReportItem instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportItem instance to search for.</param>
|
||||
/// <returns>True if the Server.Engines.Reports.ReportItem instance is in the collection; otherwise false.</returns>
|
||||
public bool Contains(Server.Engines.Reports.ReportItem value)
|
||||
{
|
||||
return this.List.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the index a specified Server.Engines.Reports.ReportItem instance is in this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">Server.Engines.Reports.ReportItem instance to find.</param>
|
||||
/// <returns>The zero-based index of the specified Server.Engines.Reports.ReportItem instance. If the object is not found, the return value is -1.</returns>
|
||||
public int IndexOf(Server.Engines.Reports.ReportItem value)
|
||||
{
|
||||
return this.List.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a specified Server.Engines.Reports.ReportItem instance from this collection.
|
||||
/// </summary>
|
||||
/// <param name="value">The Server.Engines.Reports.ReportItem instance to remove.</param>
|
||||
public void Remove(Server.Engines.Reports.ReportItem value)
|
||||
{
|
||||
this.List.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an enumerator that can iterate through the Server.Engines.Reports.ReportItem instance.
|
||||
/// </summary>
|
||||
/// <returns>An Server.Engines.Reports.ReportItem's enumerator.</returns>
|
||||
public new ReportItemCollectionEnumerator GetEnumerator()
|
||||
{
|
||||
return new ReportItemCollectionEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert a Server.Engines.Reports.ReportItem instance into this collection at a specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">Zero-based index.</param>
|
||||
/// <param name="value">The Server.Engines.Reports.ReportItem instance to insert.</param>
|
||||
public void Insert(int index, Server.Engines.Reports.ReportItem value)
|
||||
{
|
||||
this.List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strongly typed enumerator of Server.Engines.Reports.ReportItem.
|
||||
/// </summary>
|
||||
public class ReportItemCollectionEnumerator : System.Collections.IEnumerator
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Current index
|
||||
/// </summary>
|
||||
private int _index;
|
||||
|
||||
/// <summary>
|
||||
/// Current element pointed to.
|
||||
/// </summary>
|
||||
private Server.Engines.Reports.ReportItem _currentElement;
|
||||
|
||||
/// <summary>
|
||||
/// Collection to enumerate.
|
||||
/// </summary>
|
||||
private ReportItemCollection _collection;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for enumerator.
|
||||
/// </summary>
|
||||
/// <param name="collection">Instance of the collection to enumerate.</param>
|
||||
internal ReportItemCollectionEnumerator(ReportItemCollection collection)
|
||||
{
|
||||
_index = -1;
|
||||
_collection = collection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Server.Engines.Reports.ReportItem object in the enumerated ReportItemCollection currently indexed by this instance.
|
||||
/// </summary>
|
||||
public Server.Engines.Reports.ReportItem Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current element in the collection.
|
||||
/// </summary>
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (((_index == -1)
|
||||
|| (_index >= _collection.Count)))
|
||||
{
|
||||
throw new System.IndexOutOfRangeException("Enumerator not started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return _currentElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the cursor, so it points to the beginning of the enumerator.
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
_index = -1;
|
||||
_currentElement = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advances the enumerator to the next queue of the enumeration, if one is currently available.
|
||||
/// </summary>
|
||||
/// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
|
||||
public bool MoveNext()
|
||||
{
|
||||
if ((_index
|
||||
< (_collection.Count - 1)))
|
||||
{
|
||||
_index = (_index + 1);
|
||||
_currentElement = this._collection[_index];
|
||||
return true;
|
||||
}
|
||||
_index = _collection.Count;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue