コード例 #1
0
ファイル: SwitchGenerator.cs プロジェクト: hazzik/Rhino.Net
		public virtual void SetCodePrinter(CodePrinter value)
		{
			P = value;
		}
コード例 #2
0
ファイル: Program.cs プロジェクト: hazzik/Rhino.Net
		private int Exec(string[] args)
		{
			R = new ToolErrorReporter(true, System.Console.Error);
			int arg_count = Process_options(args);
			if (arg_count == 0)
			{
				Option_error(ToolErrorReporter.GetMessage("msg.idswitch.no_file_argument"));
				return -1;
			}
			if (arg_count > 1)
			{
				Option_error(ToolErrorReporter.GetMessage("msg.idswitch.too_many_arguments"));
				return -1;
			}
			P = new CodePrinter();
			P.SetIndentStep(4);
			P.SetIndentTabSize(0);
			try
			{
				Process_file(args[0]);
			}
			catch (IOException ex)
			{
				Print_error(ToolErrorReporter.GetMessage("msg.idswitch.io_error", ex.ToString()));
				return -1;
			}
			catch (EvaluatorException)
			{
				return -1;
			}
			return 0;
		}