Files

16 lines
396 B
C#
Raw Permalink Normal View History

using System;
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Tests.Common;
public class TestOptionsMonitor<T> : IOptionsMonitor<T> where T : class
{
public TestOptionsMonitor(T currentValue) => CurrentValue = currentValue;
public T Get(string name) => CurrentValue;
public IDisposable OnChange(Action<T, string> listener) => null;
public T CurrentValue { get; }
}