2026-07-23 19:47:22 -05:00
|
|
|
using LANCommander.SDK.Models.Manifest;
|
|
|
|
|
using LANCommander.Server.Services.Providers.Metadata;
|
|
|
|
|
|
|
|
|
|
namespace LANCommander.SamplePlugin;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-07-28 19:06:33 -05:00
|
|
|
/// Minimal metadata provider added by the sample plugin. Returns no results; its purpose is to
|
2026-07-23 19:47:22 -05:00
|
|
|
/// prove that a plugin-registered <see cref="IMetadataProvider"/> is picked up by the server's
|
|
|
|
|
/// provider enumeration.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class SampleMetadataProvider : IMetadataProvider
|
|
|
|
|
{
|
|
|
|
|
public string ProviderName => "Sample Plugin Provider";
|
|
|
|
|
|
|
|
|
|
public Task<MetadataSearchResultsCollection<Game>?> SearchGamesAsync(string input, int limit = 10, int offset = 0)
|
|
|
|
|
=> Task.FromResult<MetadataSearchResultsCollection<Game>?>(
|
|
|
|
|
new MetadataSearchResultsCollection<Game>(new List<MetadataSearchResult<Game>>(), More: false, limit, offset));
|
|
|
|
|
|
|
|
|
|
public Task<Game?> GetGameAsync(string gameId) => Task.FromResult<Game?>(null);
|
|
|
|
|
}
|