/// <summary> /// Gets the resource file name that was the source of a <see cref="CompilationUnitSyntax"/>, if any. /// </summary> /// <param name="node">Compilation unit to check.</param> /// <returns>The resource name or null.</returns> public static string?GetResourceNameAnnotation(this CompilationUnitSyntax node) => node.GetAnnotations(ResourceNameKey).FirstOrDefault()?.Data;