Rename LazyRunner to Once

This commit is contained in:
Ben Olden-Cooligan 2023-09-04 10:45:15 -07:00
parent 4da563e102
commit c07eb719f5
2 changed files with 3 additions and 3 deletions

View File

@ -3,11 +3,11 @@ namespace NAPS2.Util;
/// <summary>
/// Encapsulates an action that should be run once lazily.
/// </summary>
public class LazyRunner
public class Once
{
private readonly Lazy<object> _lazy;
public LazyRunner(Action action)
public Once(Action action)
{
_lazy = new Lazy<object>(() =>
{

View File

@ -23,7 +23,7 @@ internal class LocalTwainSessionController : ITwainSessionController
AssemblyHelper.Company, AssemblyHelper.Product, AssemblyHelper.Product, AssemblyHelper.Description);
}
private static readonly LazyRunner TwainDsmSetup = new(() =>
private static readonly Once TwainDsmSetup = new(() =>
{
var twainDsmPath = NativeLibrary.FindLibraryPath("twaindsm.dll");
PlatformCompat.System.LoadLibrary(twainDsmPath);