public static object GetNamedArgumentDefaultTypeValue()

in src/WorkerIndexingHelper.cs [284:290]


        public static object GetNamedArgumentDefaultTypeValue(AttributeAst attribute, string argumentName, object defaultValue)
        {
            // Filter the named arguments for the one with the correct name
            var matchingNamedArguments = attribute.NamedArguments.Where(x => x.ArgumentName == argumentName);
            //PowerShell syntax ensures that argument names must be unique, so First() is safe
            return matchingNamedArguments.Any() ? ConvertExpressionToDefaultType(matchingNamedArguments.First().Argument) : defaultValue;
        }