|
using System;
namespace ONX.Cmn
{
public class MyService : MarshalByRefObject
{
private static int Id_ = 0;
private int id_;
public MyService()
{
id_ = System.Threading.Interlocked.Increment(ref Id_);
Log.Print("Instance of MyService is created, MyService.id={0}", id_);
}
~MyService()
{
Log.Print("Instance of MyService is destroyed, MyService.id={0}", id_);
}
public string func1()
{
Log.Print("func1() is invoked, MyService.id={0}", id_);
return string.Format("MyService#{0}.func1()", id_);
}
public string func2()
{
Log.Print("func2() is invoked, MyService.id={0}", id_);
return string.Format("MyService#{0}.func2()", id_);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.