lib_unity_purchase/Runtime/Purchasing/SimpleCatalogProvider.cs

22 lines
548 B
C#
Raw Permalink Normal View History

2024-01-29 18:49:33 +08:00
using System;
using System.Collections.Generic;
using UnityEngine.Purchasing.Extension;
namespace UnityEngine.Purchasing
{
internal class SimpleCatalogProvider : ICatalogProvider
{
private readonly Action<Action<HashSet<ProductDefinition>>> m_Func;
internal SimpleCatalogProvider(Action<Action<HashSet<ProductDefinition>>> func)
{
m_Func = func;
}
public void FetchProducts(Action<HashSet<ProductDefinition>> callback)
{
m_Func?.Invoke(callback);
}
}
}