Ejemplo n.º 1
0
        public static void Run(string[] args)
        {
            try
            {
                object param = new AddtestDataToolParam();
                CommandLineArgumentParser.CommandLineParser(ref param, args);
                cParam = (AddtestDataToolParam)param;
                if (cParam.IsUsage)
                {
                    AssemblyUsage.PrintLogo(cParam.IsLogo);
                    AssemblyUsage.PrintUsage();
                    return;
                }

                if (!ValidateParameters())
                {
                    return;
                }

                AddTestData(cParam.S_cacheId, cParam.S_itemCount, cParam.S_dataSize, cParam.S_AbsoluteExpiration);
            }
            catch (Exception e)
            {
                Console.Error.WriteLine("Error: " + e.Message);
                Console.Error.WriteLine();
                Console.Error.WriteLine(e.ToString());
            }
        }
Ejemplo n.º 2
0
        public static void Run(string[] args)
        {
            try
            {
                object param = new AddtestDataToolParam();
                CommandLineArgumentParser.CommandLineParser(ref param, args);
                cParam = (AddtestDataToolParam)param;
                if (cParam.IsUsage)
                {
                    AssemblyUsage.PrintLogo(cParam.IsLogo);
                    AssemblyUsage.PrintUsage();
                    return;
                }

                if (!ValidateParameters()) return;

                AddTestData(cParam.S_cacheId,cParam.S_itemCount,cParam.S_dataSize);

            }
            catch (Exception e)
            {
                Console.Error.WriteLine("Error: " + e.Message);
                Console.Error.WriteLine();
                Console.Error.WriteLine(e.ToString());
            }
        }