public MaterialDescriptionFile(string modelPath) { this.File = GetMaterialDescriptionFilePath(modelPath); var parser = new MaterialDescriptionParser(modelPath); this.Descriptions = parser.Parse(this.File); }
public MaterialDescriptionFile(string modelPath) { var dot = Path.GetFullPath(modelPath).LastIndexOf(".", StringComparison.OrdinalIgnoreCase); var file = modelPath.Substring(0, dot) + "." + Extension; if (!File.Exists(file)) { throw new FileNotFoundException($"Could not find file {file}", file); } var parser = new MaterialDescriptionParser(modelPath); this.Descriptions = parser.Parse(file); }