mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Implement plugin system (#1020)
* Implement basic plugin system * The dawn of new era * Add plugins warning * Move more members to PublicAPI * Open commands for the plugins * Add IBotHackNewChat * Run plugin events in parallel * Use properties in IPlugin * Hook our custom plugin into CI to ensure it compiles * Fix dotnet brain damage * Add IBotsComparer * Add code documentation * Add IBotTradeOffer * Add IBotTradeOffer example * Add IBotTradeOfferResults * Final bulletproofing * Final renaming
This commit is contained in:
committed by
GitHub
parent
62a770479e
commit
0f2a816b92
@@ -22,9 +22,10 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace ArchiSteamFarm.Helpers {
|
||||
internal sealed class ArchiCacheable<T> : IDisposable {
|
||||
public sealed class ArchiCacheable<T> : IDisposable {
|
||||
private readonly TimeSpan CacheLifetime;
|
||||
private readonly SemaphoreSlim InitSemaphore = new SemaphoreSlim(1, 1);
|
||||
private readonly Func<Task<(bool Success, T Result)>> ResolveFunction;
|
||||
@@ -53,7 +54,8 @@ namespace ArchiSteamFarm.Helpers {
|
||||
MaintenanceTimer?.Dispose();
|
||||
}
|
||||
|
||||
internal async Task<(bool Success, T Result)> GetValue() {
|
||||
[PublicAPI]
|
||||
public async Task<(bool Success, T Result)> GetValue() {
|
||||
if (IsInitialized && IsRecent) {
|
||||
return (true, InitializedValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user