in src/WorkerIndexingHelper.cs [174:197]
private static void ExtractBindings(FunctionInformation thisFunction, ParamBlockAst paramBlock)
{
if (paramBlock == null)
{
return;
}
IEnumerable<AttributeAst>? functionAttribute = paramBlock.Attributes.Where(x => x.TypeName.Name == Constants.AttributeNames.Function && x.NamedArguments.Where(x => x.ArgumentName == "Name").Any());
if (functionAttribute.Any() && functionAttribute.First().NamedArguments.Where(x => x.ArgumentName == "Name").First().Argument.GetType() == typeof(StringConstantExpressionAst))
{
thisFunction.Name = ((StringConstantExpressionAst)functionAttribute.First().NamedArguments.Where(x => x.ArgumentName == "Name").First().Argument).Value;
}
inputBindings = new List<BindingInformation>();
outputBindings = new List<BindingInformation>();
GetInputBindingInfo(paramBlock);
GetOutputBindingInfo(paramBlock.Attributes);
List<BindingInformation> missingBindings = BindingExtractor.GetDefaultBindings(inputBindings, outputBindings);
thisFunction.Bindings.AddRange(inputBindings);
thisFunction.Bindings.AddRange(outputBindings);
thisFunction.Bindings.AddRange(missingBindings);
}