/// <summary> /// Gets the XElement for the specified source file. If the SrcML does not already exist in the archive, it will be created. /// </summary> /// <param name="sourceFilePath">The source file to get the root XElement for.</param> /// <returns>The root XElement of the source file.</returns> public virtual XElement GetXElementForSourceFile(string sourceFilePath) { if (!File.Exists(sourceFilePath)) { return(null); } else { string xmlPath = GetArchivePath(sourceFilePath); if (!File.Exists(xmlPath)) { return(null); } return(SrcMLElement.Load(xmlPath)); } }
/// <summary> /// Gets the XElement for the specified source file. If the SrcML does not already exist in the archive, it will be created. /// </summary> /// <param name="sourceFilePath">The source file to get the root XElement for.</param> /// <returns>The root XElement of the source file.</returns> public XElement GetXElementForSourceFile(string sourceFilePath) { if (!File.Exists(sourceFilePath)) { return(null); } else { string xmlPath = GetXmlPath(sourceFilePath); if (!File.Exists(xmlPath)) { GenerateXmlForSource(sourceFilePath); } return(SrcMLElement.Load(xmlPath)); } }