MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.ReadFile C# (CSharp) Method

ReadFile() public method

public ReadFile ( string fileName, MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormat format, IProgressMonitor monitor ) : object
fileName string
format MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormat
monitor IProgressMonitor
return object
		public object ReadFile (string fileName, MSBuildFileFormat format, IProgressMonitor monitor)
		{
			if (fileName == null || monitor == null)
				return null;

			Solution sol;
			try {
				ProjectExtensionUtil.BeginLoadOperation ();
				sol = new Solution ();
				monitor.BeginTask (string.Format (GettextCatalog.GetString ("Loading solution: {0}"), fileName), 1);
				var projectLoadMonitor = monitor as IProjectLoadProgressMonitor;
				if (projectLoadMonitor != null)
					projectLoadMonitor.CurrentSolution = sol;
				LoadSolution (sol, fileName, format, monitor);
			} catch (Exception ex) {
				monitor.ReportError (GettextCatalog.GetString ("Could not load solution: {0}", fileName), ex);
				throw;
			} finally {
				ProjectExtensionUtil.EndLoadOperation ();
				monitor.EndTask ();
			}
			return sol;
		}