Use C# 9 records in non-net5.0 projects
[DebuggerDisplay("{Name} = {Value}")]
record ResourceValue(string Name, string Value, bool HasFormat)
{
public bool IsIndexed { get; init; }
public List<string> Format { get; } = new List<string>();
}Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
namespace System.Runtime.CompilerServices
{
/// <summary>
/// Reserved to be used by the compiler for tracking metadata.
/// This class should not be used by developers in source code.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
sealed class IsExternalInit
{
}
}PreviousPersisting output files from source generatorsNextAsyncLocal never leaks and is safe for CallContext-like state
Last updated