public X10Module(X10Main x10c, string code) { x10 = x10c; Code = code; houseCode = Utility.HouseCodeFromString(code); unitCode = Utility.UnitCodeFromString(code); Level = 0.0; Description = ""; }
static void Main(string[] args) { status = 1; AssemblyLoadContext.Default.Unloading += SigTermEventHandler; //register sigterm event handler. Don't forget to import System.Runtime.Loader! Console.CancelKeyPress += CancelHandler; //register sigint event handler AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException; X10Main.logger = logger; manager = new X10Main(); manager.Open(); status = 2; while (status > 0) { Thread.Sleep(1000); } status = -1; manager.Close(); }