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

                if (!ValidateParameters())
                {
                    return;
                }
                ClearCache(cParam.S_cacheId, cParam.S_forceClear, cParam.S_clearJsCss);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error: " + ex.Message);
                Console.Error.WriteLine();
                Console.Error.WriteLine(ex.ToString());
            }
        }
Exemple #2
0
        public static void Run(string[] args)
        {
            try
            {
                object param = new ClearCacheToolParam();
                CommandLineArgumentParser.CommandLineParser(ref param, args);
                cParam = (ClearCacheToolParam)param;
                if (cParam.IsUsage)
                {
                    AssemblyUsage.PrintUsage();
                    AssemblyUsage.PrintLogo(cParam.IsLogo);
                    return;
                }

                if (!ValidateParameters()) return;
                ClearCache(cParam.S_cacheId,cParam.S_forceClear,cParam.S_clearJsCss);

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