MonoDevelop.Projects.ProjectService.ReadFile C# (CSharp) Méthode

ReadFile() private méthode

private ReadFile ( IProgressMonitor monitor, string file, Type expectedType, MonoDevelop.Projects.FileFormat &format ) : object
monitor IProgressMonitor
file string
expectedType System.Type
format MonoDevelop.Projects.FileFormat
Résultat object
		object ReadFile (IProgressMonitor monitor, string file, Type expectedType, out FileFormat format)
		{
			FileFormat[] formats = formatManager.GetFileFormats (file, expectedType);

			if (formats.Length == 0)
				throw new InvalidOperationException ("Unknown file format: " + file);
			
			format = formats [0];
			object obj = format.Format.ReadFile (file, expectedType, monitor);
			if (obj == null)
				throw new InvalidOperationException ("Invalid file format: " + file);

			return obj;
		}