using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlTypes;
using System.Data;
using Test5Client.canopus5;

namespace Test5Client
{
class Program
{
  static void Main(string[] args)
  {
    Test5 test5 = new Test5();
    test5.UseDefaultCredentials = true;
    SqlInt32 data = 0;
    Object[] results = test5.GetTest5(ref data);
    foreach (object result in results)
    {
      if (result is Int32)
      {
        Console.WriteLine("Result code {0}", (Int32)result);
      }
      if (result is SqlRowCount)
      {
        Console.WriteLine("Row count {0}", (result as SqlRowCount).Count);
      }
      if (result is SqlMessage)
      {
        Console.WriteLine("Message {0}", (result as SqlMessage).Message);
      }
      if (result is DataSet)
      {
        Console.WriteLine("DataSet");
        (result as DataSet).WriteXml(Console.Out);
        DataTable t = (result as DataSet).Tables[0];
        
        Console.WriteLine();
      }
    }
  }
}
}
