Output
3, 1

Output HTML
<script type="text/javascript">
//<![CDATA[
function Additizer()
{
	this._operations = 0;
	var LastSumk__BackingField = 0;
	this.get_LastSum = function()
	{
		return this.LastSumk__BackingField;
	}
	this.set_LastSum = function(arg0)
	{
		this.LastSumk__BackingField = arg0;
	}
	this.Add = function(arg0, arg1)
	{
		this._operations = (this._operations) + 1;
		this.set_LastSum((arg0) + (arg1));
		return (arg0) + (arg1);
	}
	this.Pretend = function()
	{
		this._operations = (this._operations) + 1;
	}
	this.AddStatic = function(arg0, arg1)
	{
		return (arg0) + (arg1);
	}
	
	if (arguments.length == 0)
		this._operations = 0;
}
function AdditizerTest()
{
	var a;
	var b;
	a = new Additizer();
	b = a.Add(1, 2);
	document.getElementById('lblOutput').innerHTML = (String(b)) + (', ') + (a._operations);
}
//]]>
</script>


ASPX Page
<div>
	<asp:Label runat="server" ID="lblOutput" />
	<axial:WFClass runat="server" ClassName="AxialWeb.Additizer" />
</div>
<axial:WFStartupScript runat="server" MethodName="AdditizerTest" />


Codebehind
public void AdditizerTest()
{
	var additizer = new Additizer();
	int sum = additizer.Add(1, 2);
	lblOutput.Text = sum.ToString() + ", " + additizer._operations;
}

Last edited Aug 5, 2008 at 8:36 PM by thasmin, version 1

Comments

No comments yet.