Author: gert
Date: 2007-05-09 15:01:51 -0400 (Wed, 09 May 2007)
New Revision: 77084

Added:
   trunk/gert/standalone/bug81175/
   trunk/gert/standalone/bug81175/default.build
   trunk/gert/standalone/bug81175/test.cs
   trunk/gert/standalone/bug81175/web/
   trunk/gert/standalone/bug81175/web/App_Code/
   trunk/gert/standalone/bug81175/web/App_Code/BusinessEntity.cs
   trunk/gert/standalone/bug81175/web/App_Code/BusinessLayer.cs
   trunk/gert/standalone/bug81175/web/Create.aspx
   trunk/gert/standalone/bug81175/web/Create.aspx.cs
   trunk/gert/standalone/bug81175/web/Web.Config
   trunk/gert/standalone/bug81183/
   trunk/gert/standalone/bug81183/WindowsApp/
   trunk/gert/standalone/bug81183/WindowsApp/Form1.Designer.cs
   trunk/gert/standalone/bug81183/WindowsApp/Form1.cs
   trunk/gert/standalone/bug81183/WindowsApp/Program.cs
   trunk/gert/standalone/bug81183/default.build
   trunk/gert/standalone/bug81183/test.cs
   trunk/gert/standalone/bug81573/
   trunk/gert/standalone/bug81573/default.build
   trunk/gert/standalone/bug81573/test.cs
Log:
Added few more tests.


Added: trunk/gert/standalone/bug81175/default.build
===================================================================
--- trunk/gert/standalone/bug81175/default.build        2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81175/default.build        2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,54 @@
+<project name="bug81175" default="rebuild">
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+       </target>
+
+       <property name="frameworks" value="mono-2.0,net-2.0" />
+       
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="web/bin/**" />
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Web.dll" />
+                       </references>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile">
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}" />
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug81175/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/test.cs
===================================================================
--- trunk/gert/standalone/bug81175/test.cs      2007-05-09 18:50:07 UTC (rev 
77083)
+++ trunk/gert/standalone/bug81175/test.cs      2007-05-09 19:01:51 UTC (rev 
77084)
@@ -0,0 +1,52 @@
+using System;
+using System.IO;
+using System.Web;
+using System.Web.Hosting;
+
+class TinyHost : MarshalByRefObject
+{
+       static TinyHost CreateHost ()
+       {
+               string path = Path.Combine 
(AppDomain.CurrentDomain.BaseDirectory, "web");
+               string bin = Path.Combine (path, "bin");
+               string asm = Path.GetFileName (typeof 
(TinyHost).Assembly.Location);
+
+               Directory.CreateDirectory (bin);
+               File.Copy (asm, Path.Combine (bin, asm), true);
+
+               return (TinyHost) ApplicationHost.CreateApplicationHost (
+                       typeof (TinyHost), "/", path);
+       }
+
+       public void Execute (string page, TextWriter tw)
+       {
+               SimpleWorkerRequest req = new SimpleWorkerRequest (
+                       page, "", tw);
+               HttpRuntime.ProcessRequest (req);
+       }
+
+       static int Main ()
+       {
+               TinyHost h = CreateHost ();
+               StringWriter sw = new StringWriter ();
+               h.Execute ("Create.aspx", sw);
+               string result = sw.ToString ();
+
+               if (result.IndexOf ("<td>Data 1</td>") == -1) {
+                       Console.WriteLine (result);
+                       return 1;
+               }
+
+               if (result.IndexOf ("<td>Item 1</td>") == -1) {
+                       Console.WriteLine (result);
+                       return 2;
+               }
+
+               if (result.IndexOf ("<td><span>1</span></td>") == -1) {
+                       Console.WriteLine (result);
+                       return 3;
+               }
+
+               return 0;
+       }
+}


Property changes on: trunk/gert/standalone/bug81175/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/web/App_Code/BusinessEntity.cs
===================================================================
--- trunk/gert/standalone/bug81175/web/App_Code/BusinessEntity.cs       
2007-05-09 18:50:07 UTC (rev 77083)
+++ trunk/gert/standalone/bug81175/web/App_Code/BusinessEntity.cs       
2007-05-09 19:01:51 UTC (rev 77084)
@@ -0,0 +1,30 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+/// <summary>
+/// Summary description for BusinessEntity
+/// </summary>
+public class BusinessEntity
+{
+       private string m_data1 = string.Empty;
+       private string m_data2 = string.Empty;
+
+       public string Data1
+       {
+               get { return m_data1; }
+               set { m_data1 = value; }
+       }
+
+       public string Data2
+       {
+               get { return m_data2; }
+               set { m_data2 = value; }
+       }
+}


Property changes on: 
trunk/gert/standalone/bug81175/web/App_Code/BusinessEntity.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/web/App_Code/BusinessLayer.cs
===================================================================
--- trunk/gert/standalone/bug81175/web/App_Code/BusinessLayer.cs        
2007-05-09 18:50:07 UTC (rev 77083)
+++ trunk/gert/standalone/bug81175/web/App_Code/BusinessLayer.cs        
2007-05-09 19:01:51 UTC (rev 77084)
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Configuration;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+/// <summary>
+/// Summary description for BusinessLayer
+/// </summary>
+public class BusinessLayer
+{
+       public BusinessLayer()
+       {
+       }
+
+       public List<BusinessEntity> SelectEntity(int startIndex, int maxCount)
+       {
+               BusinessEntity item1 = new BusinessEntity();
+               item1.Data1 = "Item 1";
+               item1.Data2 = "Data 1";
+
+               BusinessEntity item2 = new BusinessEntity();
+               item2.Data1 = "Item 2";
+               item2.Data2 = "Data 2";
+
+               List<BusinessEntity> result = new List<BusinessEntity>(2);
+               result.Add(item1);
+               result.Add(item2);
+
+               return result;
+       }
+
+       public int EntityCount(int startIndex, int maxCount)
+       {
+               return 4;
+       }
+}


Property changes on: 
trunk/gert/standalone/bug81175/web/App_Code/BusinessLayer.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/web/Create.aspx
===================================================================
--- trunk/gert/standalone/bug81175/web/Create.aspx      2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81175/web/Create.aspx      2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,24 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Create.aspx.cs" 
Inherits="CreatePage" %>
+
+<html>
+<head id="head1" runat="server">
+</head>
+<body>
+       <form id="form1" runat="server">
+               <asp:ObjectDataSource ID="ObjectDataSource" runat="server" 
TypeName="BusinessLayer"
+                       SelectCountMethod="EntityCount" 
SelectMethod="SelectEntity" OnSelecting="ObjectDataSource_Selecting">
+                       <SelectParameters>
+                               <asp:Parameter Name="startIndex" Type="Int32" />
+                               <asp:Parameter Name="maxCount" Type="Int32" />
+                       </SelectParameters>
+               </asp:ObjectDataSource>
+               <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
AutoGenerateColumns="False"
+                       DataSourceID="ObjectDataSource" PageSize="1">
+                       <Columns>
+                               <asp:BoundField DataField="Data2" 
HeaderText="Data2" SortExpression="Data2" />
+                               <asp:BoundField DataField="Data1" 
HeaderText="Data1" SortExpression="Data1" />
+                       </Columns>
+               </asp:GridView>
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug81175/web/Create.aspx
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/web/Create.aspx.cs
===================================================================
--- trunk/gert/standalone/bug81175/web/Create.aspx.cs   2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81175/web/Create.aspx.cs   2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,25 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+
+public partial class CreatePage : Page
+{
+       protected void Page_Load(object sender, EventArgs e)
+       {
+               
+       }
+
+       protected void ObjectDataSource_Selecting(object sender, 
ObjectDataSourceSelectingEventArgs e)
+       {
+               GridView1.PageSize = 1; 
+       }
+}
+


Property changes on: trunk/gert/standalone/bug81175/web/Create.aspx.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81175/web/Web.Config
===================================================================
--- trunk/gert/standalone/bug81175/web/Web.Config       2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81175/web/Web.Config       2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!-- 
+    Note: As an alternative to hand editing this file you can use the 
+    web admin tool to configure settings for your application. Use
+    the Website->Asp.Net Configuration option in Visual Studio.
+    A full list of settings and comments can be found in 
+    machine.config.comments usually located in 
+    \Windows\Microsoft.Net\Framework\v2.x\Config 
+-->
+<configuration>
+       <appSettings/>
+       <connectionStrings/>
+       <system.web>
+               <!-- 
+            Set compilation debug="true" to insert debugging 
+            symbols into the compiled page. Because this 
+            affects performance, set this value to true only 
+            during development.
+        -->
+               <compilation debug="true"/>
+               <!--
+            The <authentication> section enables configuration 
+            of the security authentication mode used by 
+            ASP.NET to identify an incoming user. 
+        -->
+               <authentication mode="Windows"/>
+               <!--
+            The <customErrors> section enables configuration 
+            of what to do if/when an unhandled error occurs 
+            during the execution of a request. Specifically, 
+            it enables developers to configure html error pages 
+            to be displayed in place of a error stack trace.
+
+        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
+            <error statusCode="403" redirect="NoAccess.htm" />
+            <error statusCode="404" redirect="FileNotFound.htm" />
+        </customErrors>
+        -->
+       </system.web>
+</configuration>

Added: trunk/gert/standalone/bug81183/WindowsApp/Form1.Designer.cs
===================================================================
--- trunk/gert/standalone/bug81183/WindowsApp/Form1.Designer.cs 2007-05-09 
18:50:07 UTC (rev 77083)
+++ trunk/gert/standalone/bug81183/WindowsApp/Form1.Designer.cs 2007-05-09 
19:01:51 UTC (rev 77084)
@@ -0,0 +1,61 @@
+using System;
+
+namespace WindowsAppli
+{
+       partial class Form1
+       {
+               private System.ComponentModel.IContainer components = null;
+
+               protected override void Dispose (bool disposing)
+               {
+                       if (disposing && (components != null)) {
+                               components.Dispose ();
+                       }
+                       base.Dispose (disposing);
+               }
+
+               private void InitializeComponent ()
+               {
+                       this.dataGridView1 = new 
System.Windows.Forms.DataGridView ();
+                       this.Column1 = new 
System.Windows.Forms.DataGridViewTextBoxColumn ();
+                       ((System.ComponentModel.ISupportInitialize) 
(this.dataGridView1)).BeginInit ();
+                       this.SuspendLayout ();
+                       // 
+                       // dataGridView1
+                       // 
+                       this.dataGridView1.ColumnHeadersHeightSizeMode = 
System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+                       this.dataGridView1.Columns.AddRange (new 
System.Windows.Forms.DataGridViewColumn [] { this.Column1});
+                       this.dataGridView1.Location = new System.Drawing.Point 
(12, 115);
+                       this.dataGridView1.Name = "dataGridView1";
+                       this.dataGridView1.RowTemplate.Height = 21;
+                       this.dataGridView1.Size = new System.Drawing.Size (268, 
146);
+                       this.dataGridView1.TabIndex = 0;
+                       // 
+                       // Column1
+                       // 
+                       this.Column1.HeaderText = "金額";
+                       this.Column1.Name = "Column1";
+                       // 
+                       // Form1
+                       // 
+                       this.AutoScaleDimensions = new System.Drawing.SizeF 
(6F, 12F);
+                       this.AutoScaleMode = 
System.Windows.Forms.AutoScaleMode.Font;
+                       this.ClientSize = new System.Drawing.Size (292, 273);
+                       this.Controls.Add (this.dataGridView1);
+                       this.Name = "Form1";
+                       this.Text = "Form1";
+                       ((System.ComponentModel.ISupportInitialize) 
(this.dataGridView1)).EndInit ();
+                       this.ResumeLayout (false);
+                       Load += new EventHandler (Form1_Load);
+               }
+
+               void Form1_Load (object sender, EventArgs e)
+               {
+                       Close ();
+               }
+
+               private System.Windows.Forms.DataGridView dataGridView1;
+               private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+       }
+}
+


Property changes on: trunk/gert/standalone/bug81183/WindowsApp/Form1.Designer.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81183/WindowsApp/Form1.cs
===================================================================
--- trunk/gert/standalone/bug81183/WindowsApp/Form1.cs  2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81183/WindowsApp/Form1.cs  2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace WindowsAppli
+{
+       public partial class Form1 : Form
+       {
+               public Form1 ()
+               {
+                       InitializeComponent ();
+               }
+       }
+}


Property changes on: trunk/gert/standalone/bug81183/WindowsApp/Form1.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81183/WindowsApp/Program.cs
===================================================================
--- trunk/gert/standalone/bug81183/WindowsApp/Program.cs        2007-05-09 
18:50:07 UTC (rev 77083)
+++ trunk/gert/standalone/bug81183/WindowsApp/Program.cs        2007-05-09 
19:01:51 UTC (rev 77084)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace WindowsAppli
+{
+    static class Program
+    {
+        /// <summary>
+        /// アプリケーションのメイン エントリ ポイントです。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}
\ No newline at end of file


Property changes on: trunk/gert/standalone/bug81183/WindowsApp/Program.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81183/default.build
===================================================================
--- trunk/gert/standalone/bug81183/default.build        2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81183/default.build        2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,69 @@
+<project name="bug81183" default="rebuild">
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <property name="frameworks" value="mono-2.0" />
+       
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="Mono.Cecil.dll" />
+                               <include name="test.exe" />
+                               <include name="WindowsApp1.exe" />
+                               <include name="WindowsApp2.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="winexe" define="${csc.defines}" 
output="WindowsApp1.exe" warnaserror="true" warninglevel="4">
+                       <sources basedir="WindowsApp">
+                               <include name="*.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Data.dll" />
+                               <include name="System.Drawing.dll" />
+                               <include name="System.Windows.Forms.dll" />
+                       </references>
+               </csc>
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+                       <pkg-references>
+                               <package name="mono-cecil" />
+                       </pkg-references>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile">
+               <copy todir=".">
+                       <fileset 
basedir="${pkg-config::get-variable('mono-cecil','assemblies_dir')}">
+                               <include name="Mono.Cecil.dll" />
+                       </fileset>
+               </copy>
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}">#1</fail>
+               <exec program="WindowsApp2.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}">#2</fail>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug81183/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81183/test.cs
===================================================================
--- trunk/gert/standalone/bug81183/test.cs      2007-05-09 18:50:07 UTC (rev 
77083)
+++ trunk/gert/standalone/bug81183/test.cs      2007-05-09 19:01:51 UTC (rev 
77084)
@@ -0,0 +1,15 @@
+using System;
+using System.IO;
+
+using Mono.Cecil;
+
+class Program
+{
+       static void Main (string [] args)
+       {
+               string dir = AppDomain.CurrentDomain.BaseDirectory;
+
+               AssemblyDefinition asm = AssemblyFactory.GetAssembly 
(Path.Combine (dir, "WindowsApp1.exe"));
+               AssemblyFactory.SaveAssembly (asm, Path.Combine (dir, 
"WindowsApp2.exe"));
+       }
+}


Property changes on: trunk/gert/standalone/bug81183/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81573/default.build
===================================================================
--- trunk/gert/standalone/bug81573/default.build        2007-05-09 18:50:07 UTC 
(rev 77083)
+++ trunk/gert/standalone/bug81573/default.build        2007-05-09 19:01:51 UTC 
(rev 77084)
@@ -0,0 +1,57 @@
+<project name="bug81573" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+       </target>
+
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <target name="net-1.1">
+               <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+       </target>
+
+       <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile">
+               <exec program="test.exe" managed="true" />
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug81573/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81573/test.cs
===================================================================
--- trunk/gert/standalone/bug81573/test.cs      2007-05-09 18:50:07 UTC (rev 
77083)
+++ trunk/gert/standalone/bug81573/test.cs      2007-05-09 19:01:51 UTC (rev 
77084)
@@ -0,0 +1,40 @@
+using System;
+using System.Text;
+using System.Threading;
+
+class Program
+{
+       static int Main (string [] args)
+       {
+               for (int i = 1; i < 56; i++) {
+                       try {
+                               ThreadPool.QueueUserWorkItem (new WaitCallback 
(StartMethod));
+                       } catch (Exception ex) {
+                               Console.WriteLine (ex.Message);
+                               Console.WriteLine (ex.StackTrace);
+                               return 1;
+                       }
+                       Thread.Sleep (100);
+               }
+               return 0;
+       }
+
+       static void StartMethod (Object stateInfo)
+       {
+               DisplayNumbers (DateTime.Now.Millisecond.ToString ());
+               Console.WriteLine ("Thread Finished");
+       }
+
+       static void DisplayNumbers (string GivenThreadName)
+       {
+               Console.WriteLine ("Starting thread: " + GivenThreadName);
+
+               for (int i = 1; i <= 800; i++) {
+                       if (i % 100 == 0) {
+                               Console.WriteLine ("thread: " + GivenThreadName 
+ " Count " + i);
+                               Thread.Sleep (1000);
+                       }
+               }
+       }
+}
+


Property changes on: trunk/gert/standalone/bug81573/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to