7 references to Create
Microsoft.Extensions.AI.Tests (7)
Functions\AIFunctionFactoryTest.cs (7)
35Assert.Throws<ArgumentNullException>("method", () => AIFunctionFactory.Create(method: null!, target: new object())); 36Assert.Throws<ArgumentNullException>("method", () => AIFunctionFactory.Create(method: null!, target: new object(), name: "myAiFunk")); 37Assert.Throws<ArgumentNullException>("target", () => AIFunctionFactory.Create(typeof(AIFunctionFactoryTest).GetMethod(nameof(InvalidArguments_Throw))!, (object?)null)); 40Assert.Throws<ArgumentException>("method", () => AIFunctionFactory.Create(typeof(List<>).GetMethod("Add")!, new List<int>())); 405AIFunction func = AIFunctionFactory.Create(overrideMethod, new MyDerivedType()); 469AIFunction f = AIFunctionFactory.Create(overrideMethod, new DerivedDescribed()); 1672AIFunction func = AIFunctionFactory.Create(testDelegate.GetMethodInfo(), testDelegate.Target);