19 instantiations of AIParameterNameAttribute
Microsoft.Extensions.AI.Abstractions.Tests (7)
Functions\AINameAttributesTests.cs (2)
21Assert.Throws<ArgumentNullException>("name", () => new AIParameterNameAttribute(null!)); 22Assert.Throws<ArgumentException>("name", () => new AIParameterNameAttribute(" "));
Utilities\AIJsonUtilitiesTests.cs (5)
605static void TestMethod([AIParameterName("custom_property_name")] string select, int top) 625static void DuplicateByAttribute([AIParameterName("dup")] string first, [AIParameterName("dup")] string second) 634static void DuplicateByCollision([AIParameterName("filter")] string select, string filter) 648static void TestMethod([AIParameterName("a/b~c")] RecursiveNode node)
Microsoft.Extensions.AI.Tests (12)
Functions\AIFunctionFactoryTest.cs (12)
120AIFunctionFactory.Create(([AIParameterName("theParam")] string otherName) => otherName), 342AIFunction func = AIFunctionFactory.Create([AIFunctionName("my_tool")] ([AIParameterName("my_param")] string myParam) => myParam); 355AIFunction func = AIFunctionFactory.Create(([AIParameterName("$select")] string select, int top) => select + top); 364([AIParameterName("my_param")] string myParam, int top) => myParam + top); 389([AIParameterName("my_param")] string myParam) => myParam, 419([AIParameterName("a/b~c")] AIParameterNameAttributeRecursiveNode node) => node.ToString(), 432([AIParameterName("dup")] string first, [AIParameterName("dup")] string second) => first + second)); 437([AIParameterName("filter")] string select, string filter) => select + filter)); 458([AIParameterName("dup")] string first, [AIParameterName("dup")] string second) => first + second, 1828public abstract string Method([AIParameterName("my_param")] string myParam);
4 references to AIParameterNameAttribute
Microsoft.Extensions.AI.Abstractions (4)
Functions\AIFunctionFactory.cs (1)
819Throw.ArgumentException("method", $"Multiple parameters are mapped to the same name '{effectiveName}'. Ensure that any {nameof(AIParameterNameAttribute)} values do not collide with each other or with other parameter names.");
Functions\AIParameterNameAttribute.cs (1)
20/// <summary>Initializes a new instance of the <see cref="AIParameterNameAttribute"/> class.</summary>
Utilities\AIJsonUtilities.Schema.Create.cs (2)
135Throw.ArgumentException(nameof(method), $"Multiple parameters are mapped to the same name '{parameterSchemaName}'. Ensure that any {nameof(AIParameterNameAttribute)} values do not collide with each other or with other parameter names."); 874parameter.GetCustomAttribute<AIParameterNameAttribute>(inherit: true)?.Name ?? parameter.Name!;