예제 #1
0
        private bool disposedValue = false; // To detect redundant calls


        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (_cliCompose != null)
                    {
                        _cliCompose.CancelAll();
                        _cliCompose.Dispose();
                    }

                    if (_cliDocker != null)
                    {
                        _cliDocker.CancelAll();
                        _cliDocker.Dispose();
                    }
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                //if (Directory.Exists(_executionPath)) Directory.Delete(_executionPath, true);

                disposedValue = true;
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            var cli        = new Cli();
            var current_db = cli.GetCurrentDB();

            // byte[] bytearray = new byte[16];

            // var bitArray = new BitArray(bytearray);

            // Console.WriteLine($"bit 8 {bitArray.Get(8)}");
            // bitArray.Set(8, true);
            // Console.WriteLine($"bit 8 {bitArray.Get(8)}");

            //  ((ICollection)bitArray).CopyTo(bytearray, 0);

            //  bitArray = new BitArray(bytearray);

            // Console.WriteLine($"bit 8 {bitArray.Get(8)}");
            // Console.WriteLine($"bitArray length = {bitArray.Length}");

            // Console.WriteLine($"sizeof int {sizeof(int)} \nsizeof char {sizeof(char)} \nsizeof double {sizeof(double)}");

            Console.WriteLine($"--> {(Convert.ToByte(true)) == '\0'}");

            string input;

            string[] arguments;

            while (true)
            {
                Console.Write($"{current_db}>");
                input     = "";
                arguments = new string[] {};
                input     = Console.ReadLine();
                arguments = input.Split(' ');
                if (input.ToLower() == "exit")
                {
                    break;
                }
                else
                {
                    cli.Execute(arguments);
                    Console.WriteLine();
                    current_db = cli.GetCurrentDB();
                }
            }

            cli.Dispose();
            Console.WriteLine("Bye bye!");
        }
예제 #3
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (_cliDocker != null)
                    {
                        _cliDocker.CancelAll();
                        _cliDocker.Dispose();
                    }
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }