Beispiel #1
0
        static int Main(string[] args)
        {
            int status = 1;

            // Begin: Singletons across Runtime
            config = new Config();
            new Logger(config);
            new ManaTap(config);
            new ManaFile(config);
            // End  : Singletons across Runtime

            if (args.Length <= 0)
            {
                Console.WriteLine("[Main] Undefined input parameters");
                return -1;
            }

            // eliminate case sensitivity
            string progType = args[0].ToLower();
            if (progType == "file" || progType == "files")
            {
                status = ProgPrettify(ProgConfigFiles, args);
            }
            else if (progType == "data")
            {
                status = ProgConfigData(args);
            }
            else
            {
                status = -1;
                Console.WriteLine("[Main] Unsupported program type");
            }
            Environment.Exit(status);
            return status;
        }
Beispiel #2
0
 public ManaTap(Config origC)
 {
     c = origC;
     c.Tapper = this;
     reader = null;
     dt = new DataTable();
     rowsAffected = -1;
 }
Beispiel #3
0
        public Logger(Config origC)
        {
            logTemplate = "Timestamp {{{0}}}: {1} {2}";
            logs = new List<string>();
            c = origC;
            c.Log = this;

            Init();
        }
Beispiel #4
0
 public ManaFile(Config origC)
 {
     sspCache = new List<SSP>();
     c = origC;
     c.Filr = this;
 }