diff --git a/src/Verify.SourceGenerators/VerifySourceGenerators.cs b/src/Verify.SourceGenerators/VerifySourceGenerators.cs index 3ab0a62..e0d58d1 100644 --- a/src/Verify.SourceGenerators/VerifySourceGenerators.cs +++ b/src/Verify.SourceGenerators/VerifySourceGenerators.cs @@ -97,23 +97,23 @@ static ConversionResult Convert(GeneratorDriver target, IReadOnlyDictionary shouldIgnore) + public static SettingsTask IgnoreGeneratedResult(this SettingsTask settings, Func shouldIgnore) { - settingsTask.CurrentSettings.IgnoreGeneratedResult(shouldIgnore); - return settingsTask; + settings.CurrentSettings.IgnoreGeneratedResult(shouldIgnore); + return settings; } - public static void IgnoreGeneratedResult(this VerifySettings verifySettings, Func shouldIgnore) + public static void IgnoreGeneratedResult(this VerifySettings settings, Func shouldIgnore) { - if (!verifySettings.Context.TryGetValue(IgnoreContextName, out var value)) + if (!settings.Context.TryGetValue(IgnoreContextName, out var value)) { value = new List>(); - verifySettings.Context.Add(IgnoreContextName, value); + settings.Context.Add(IgnoreContextName, value); } if (value is not List> ignoreList) { - throw new($"Unexpected value in {nameof(verifySettings.Context)}, type is not {nameof(List>)}"); + throw new($"Unexpected value in {nameof(settings.Context)}, type is not {nameof(List>)}"); } ignoreList.Add(shouldIgnore);