Author: fmantek
Date: Wed Sep 5 07:20:30 2007
New Revision: 232
Modified:
trunk/clients/cs/src/gspreadsheet/colcount.cs
trunk/clients/cs/src/gspreadsheet/rowcount.cs
trunk/clients/cs/src/gspreadsheet/worksheetentry.cs
Log:
Added some convienience constructors for the spreadsheet services
Modified: trunk/clients/cs/src/gspreadsheet/colcount.cs
==============================================================================
--- trunk/clients/cs/src/gspreadsheet/colcount.cs (original)
+++ trunk/clients/cs/src/gspreadsheet/colcount.cs Wed Sep 5 07:20:30 2007
@@ -35,6 +35,14 @@
}
/// <summary>
+ /// Constructs a column count element with a given count size.
+ /// </summary>
+ public ColCountElement(uint count)
+ {
+ Count = count;
+ }
+
+ /// <summary>
/// Gets or sets the count of columns.
/// </summary>
public uint Count
Modified: trunk/clients/cs/src/gspreadsheet/rowcount.cs
==============================================================================
--- trunk/clients/cs/src/gspreadsheet/rowcount.cs (original)
+++ trunk/clients/cs/src/gspreadsheet/rowcount.cs Wed Sep 5 07:20:30 2007
@@ -35,6 +35,14 @@
}
/// <summary>
+ /// Constructs a row count element of a given count size.
+ /// </summary>
+ public RowCountElement(uint count)
+ {
+ Count = count;
+ }
+
+ /// <summary>
/// Gets or sets the count of rows.
/// </summary>
public uint Count
Modified: trunk/clients/cs/src/gspreadsheet/worksheetentry.cs
==============================================================================
--- trunk/clients/cs/src/gspreadsheet/worksheetentry.cs (original)
+++ trunk/clients/cs/src/gspreadsheet/worksheetentry.cs Wed Sep 5 07:20:30 2007
@@ -47,7 +47,32 @@
}
/// <summary>
- /// The colCount element in this cell entry
+ /// Constructs a new WorksheetEntry instance with the given number of
+ /// rows and columns.
+ /// </summary>
+ /// <param name="rows">The number of rows.</param>
+ /// <param name="cols">The number of columns.</param>
+ public WorksheetEntry(uint rows, uint cols) : this()
+ {
+ this.ColCount = new ColCountElement(cols);
+
+ this.RowCount = new RowCountElement(rows);
+ }
+
+ /// <summary>
+ /// Constructs a new WorksheetEntry instance with a given number of
+ /// rows and columns and with a set title.
+ /// </summary>
+ /// <param name="rows">The number of rows.</param>
+ /// <param name="cols">The number of columns.</param>
+ /// <param name="title">The title of the worksheet.</param>
+ public WorksheetEntry(uint rows, uint cols, string title) :
this(rows,cols)
+ {
+ this.Title = new
AtomTextConstruct(AtomTextConstructElementType.Title,title);
+ }
+
+ /// <summary>
+ /// The colCount element in this worksheet entry
/// </summary>
public ColCountElement ColCount
{
@@ -64,6 +89,16 @@
}
/// <summary>
+ /// Sets the number of columns for this worksheet entry
+ /// </summary>
+ public uint Cols
+ {
+ get { return this.ColCount.Count; }
+ set { this.ColCount.Count = value; }
+ }
+
+
+ /// <summary>
/// The rowCount element in this cell entry
/// </summary>
public RowCountElement RowCount
@@ -78,6 +113,15 @@
rowCount = value;
ExtensionElements.Add(rowCount);
}
+ }
+
+ /// <summary>
+ /// Sets the number of rows for this worksheet entry
+ /// </summary>
+ public uint Rows
+ {
+ get { return this.RowCount.Count; }
+ set { this.RowCount.Count = value; }
}
/// <summary>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---