예제 #1
0
        private const int watcherPeriod = 100; // in milliseconds

        public Watcher(Options options, Sandboxer sandboxer, Metadata metadata)
        {
            this.options   = options;
            this.sandboxer = sandboxer;
            this.metadata  = metadata;

            if (options.Verbose)
            {
                Console.WriteLine("> Watcher constructed");
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            try {
                Options  options  = new Options();
                Metadata metadata = new Metadata();

                if (Parser.Default.ParseArgumentsStrict(args, options))
                {
                    options.Check();

                    Sandboxer sandboxer = new Sandboxer(options, metadata);
                    Watcher   watcher   = new Watcher(options, sandboxer, metadata);

                    sandboxer.Execute();
                    watcher.Run();

                    metadata.SaveIfFileDefined(options.MetaFile, options.Verbose);
                }
            } catch (Exception e) {
                Console.Error.WriteLine(e.ToString());
            }
        }