Esempio n. 1
0
        static public Microcontroller Create()
        {
            if (instance == null)
            {
                instance = new Microcontroller();
            }

            return(instance);
        }
Esempio n. 2
0
 public void Dispose()
 {
     Console.WriteLine("Close Serial Port Connection by Disposable");
     if (instance != null)
     {
         instance = null;
         connection?.Close();
     }
 }
Esempio n. 3
0
        static public Microcontroller Create(Microsoft.Extensions.Logging.ILogger logger_for_debug = null)
        {
            if (instance == null)
            {
                instance = new Microcontroller();
                logger   = logger_for_debug;
            }

            return(instance);
        }