Skip to content

Commit

Permalink
Fix global event from file
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBoxyBear committed Sep 5, 2024
1 parent 31d420a commit 4883e46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ChartTools/Events/GlobalEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public GlobalEvent(uint position, string type, string? argument = null) : base(p
/// Reads global events from a file.
/// </summary>
/// <param name="path">Path of the file</param>
public static IEnumerable<GlobalEvent> FromFile(string path) => ExtensionHandler.Read<IEnumerable<GlobalEvent>>(path, (".chart", ChartFile.ReadGlobalEvents));
public static IEnumerable<GlobalEvent> FromFile(string path) => ExtensionHandler.Read<IEnumerable<GlobalEvent>>(path, (".chart", p => ChartFile.ReadGlobalEvents(p));

/// <summary>
/// Reads global events from a file asynchronously using multitasking.
/// </summary>
/// <param name="path"><inheritdoc cref="FromFile(string)" path="/param[@name='path']"/></param>
/// <param name="cancellationToken">Token to request cancellation</param>
public static async Task<List<GlobalEvent>> FromFileAsync(string path, CancellationToken cancellationToken) => await ExtensionHandler.ReadAsync<List<GlobalEvent>>(path, (".chart", path => ChartFile.ReadGlobalEventsAsync(path, cancellationToken)));
public static async Task<List<GlobalEvent>> FromFileAsync(string path, CancellationToken cancellationToken) => await ExtensionHandler.ReadAsync(path, (".chart", path => ChartFile.ReadGlobalEventsAsync(path, cancellationToken)));
}
2 changes: 1 addition & 1 deletion Docs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Console.WriteLine("------- Building site with DocFx -------");

// TODO Only build api if the assembly is more recent than the last site build
//await DotnetApiCatalog.GenerateManagedReferenceYamlFiles(config);
await DotnetApiCatalog.GenerateManagedReferenceYamlFiles(config);

await Docset.Build(config);

Expand Down

0 comments on commit 4883e46

Please sign in to comment.