in src/PSRule.Rules.Azure/Data/Template/Functions.cs [1064:1087]
internal static object References(ITemplateContext context, object[] args)
{
var argCount = CountArgs(args);
if (argCount is < 1 or > 2)
throw ArgumentsOutOfRange(nameof(References), args);
string fullValue = null;
var full = argCount == 2 && ExpressionHelpers.TryString(args[1], out fullValue) && string.Equals(fullValue, PROPERTY_FULL, StringComparison.OrdinalIgnoreCase);
if (argCount == 2 && !full && !string.Equals(fullValue, PROPERTY_PROPERTIES, StringComparison.OrdinalIgnoreCase))
throw ArgumentFormatInvalid(nameof(References));
// Get symbolic name
if (!ExpressionHelpers.TryString(args[0], out var symbolicName))
throw ArgumentFormatInvalid(nameof(References));
if (!context.TryGetResourceCollection(symbolicName, out var resources))
throw ArgumentInvalidResourceCollection(nameof(References), symbolicName);
var result = new object[resources.Length];
for (var i = 0; i < resources.Length; i++)
result[i] = GetReferenceResult(resources[i], full);
return result;
}