using System;
using System.Data;
using System.Data.Sql;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Collections;

public partial class UserDefinedFunctions
{
	[Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName="FillRow",TableDefinition="num int")]
	public static IEnumerable Streaming()
	{
		int[] a = new int[30000];
		for (int i = 0; i < 30000; i++)
			a[i] = i+1;
		return a;
	}

	public static void FillRow(Object obj, out int intCol)
	{
		intCol = (int)obj;
		if (intCol == 0 || intCol == 10000 || intCol == 20000)
			System.Threading.Thread.Sleep(100000);
	}
};

