-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Connector: Simplifies config using custom attributes #100
Conversation
libraries/dotnet/WorkbenchConnector/AgentConfigPropertyAttribute.cs
Outdated
Show resolved
Hide resolved
* Add “UI” to spelling dict * Move agent config classes to separate folder * Ignore CA1813
Getting an error while testing example 3: [12:40:46.666] fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. System.UriFormatException: Invalid URI: The hostname could not be parsed. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context) at AgentExample.MyWorkbenchConnector.CreateAgentAsync(String agentId, String name, Object configData, CancellationToken cancellationToken) at Microsoft.SemanticWorkbench.Connector.Webservice.<>c.<b__2_0>d.MoveNext() at Microsoft.AspNetCore.Http.RequestDelegateFactory.ExecuteTaskResult[T](Task`1 task, HttpContext httpContext) |
looks like all .NET examples are broken with the same error, something must have changed in the service |
Also: validate moderation service URI in Program.cs (example 2 and 3)
Using a custom attribute for
MyAgentConfig
propoerties reduce the boilerplate code necessary to implement IAgentConfig.MyAgentConfig now extend and
AgentConflict
class that uses reflection to read the custom attributes and implements all the IAgentConfig logic.