public async Task <object> GetFile(PluginManager manager, IOHelper.DuplicateMatchSelector duplicateMatchSelector) { if (File == null) { if (string.IsNullOrEmpty(FileAssemblyQualifiedTypeName)) { File = await IOHelper.OpenFile(Filename, duplicateMatchSelector, manager); } else { var type = ReflectionHelpers.GetTypeByName(FileAssemblyQualifiedTypeName, manager); if (type == null) { File = await IOHelper.OpenFile(Filename, duplicateMatchSelector, manager); } else { File = await IOHelper.OpenFile(Filename, type, manager); } } } return(File); }
/// <summary> /// Gets the file at the given project path /// </summary> /// <param name="path">Project path of the file</param> /// <returns>The file at the given path, or null if it could not be found</returns> public async Task <object> GetFile(string path, IOHelper.DuplicateMatchSelector duplicateMatchSelector, PluginManager manager) { return(await(GetItem(path)?.GetFile(manager, duplicateMatchSelector))); }