Mono.TextTemplating.TemplateGenerator.ProcessCurrent C# (CSharp) Method

ProcessCurrent() public method

public ProcessCurrent ( ) : bool
return bool
		public bool ProcessCurrent ()
		{
			if (engine == null)
				engine = new Engine ();
			
			string content;
			try {
				content = File.ReadAllText (inputFile);
			} catch (IOException ex) {
				AddError ("Could not read input file '" + inputFile + "':\n" + ex.ToString ());
				return false;
			}
			
			string output = engine.ProcessTemplate (content, this);
			
			try {
				if (!errors.HasErrors)
					File.WriteAllText (outputFile, output, encoding);
			} catch (IOException ex) {
				AddError ("Could not read input file '" + inputFile + "':\n" + ex.ToString ());
			}
			
			return !errors.HasErrors;
		}