public static void Main()
{
Console.WriteLine("Current thread id " + Thread.CurrentThread.GetHashCode());
AddParam add = new AddParam(10, 20);
exe e = new exe();
Thread th = new Thread(new ParameterizedThreadStart(e.Run));
th.Start(add);
Thread.Sleep(1000);

Console.WriteLine("Task Completed");
}
Exemple #2
0
static void Main()
{
exe e = new exe();
myclass.ten += new IncrementValue(e.OnTen);
myclass.twenty += new ShowTen(e.OnTwenty);
myclass.thirty += new ShowTen(e.OnThirty);
myclass.countSet += new CountInitialized(e.showCount);
try
{
myclass cl = new myclass();
cl.Count = 40;
cl.runloop();
}
catch(NegativeException ng)
{
Console.WriteLine(ng.Message);
}
}
Exemple #3
0
 // openExe opens file and returns it as an exe.
 private static (exe, error) openExe(@string file)
 {
     exe   _p0 = default;
     error _p0 = default !;
 public PythonService(IWebHostEnvironment webHostEnvironment)
 {
     _exePath   = @$ "{webHostEnvironment.ContentRootPath}\Resources\Python\dist\main\main.exe";
     _modelPath = @$ "{webHostEnvironment.ContentRootPath}\Resources\Python\workspace\models\model0\model.h5";
 }