/// <summary> /// Internal 콘솔 리다이렉트 /// </summary> static bool Redirect(string[] arguments, string contents) { arguments = CommandLineUtil.SplitCombinedOptions(arguments); if (CommandLineUtil.AnyArgument(arguments, "-e")) { arguments = CommandLineUtil.DeleteArgument(arguments, "-e"); if (!CommandLineUtil.AnyStrings(arguments)) { arguments = CommandLineUtil.PushFront(arguments, ""); } } arguments = CommandLineUtil.InsertWeirdArguments <InternalConsoleOption>(arguments, true, "-e"); InternalConsoleOption option = CommandLineParser <InternalConsoleOption> .Parse(arguments); if (option.Error) { Console.Instance.WriteLine(option.ErrorMessage); if (option.HelpMessage != null) { Console.Instance.WriteLine(option.HelpMessage); } return(false); } else if (option.Help) { PrintHelp(); } else if (option.Enumerate != null) { ProcessEnumerate(option.Enumerate, option.EnumerateWithForms, option.EnumerateWithPrivate, option.EnumerateWithInstances, option.EnumerateWithStatic, option.EnumerateWithMethod); } else if (option.Get != null) { ProcessGet(option.Get, option.EnumerateWithForms, option.EnumerateWithInstances, option.EnumerateWithPrivate); } else if (option.Set != null) { ProcessSet(option.Set, option.EnumerateWithForms, option.EnumerateWithInstances); } else if (option.Call != null) { ProcessCall(option.Call, option.EnumerateWithForms, option.EnumerateWithInstances, option.CallWithReturn); } return(true); }