From 7d6bc0fea257b09d384284dfc7e71213d56fdc35 Mon Sep 17 00:00:00 2001 From: Joanna May Date: Wed, 23 Oct 2024 13:54:24 -0500 Subject: [PATCH] chore: upgrade introspection --- .../Chickensoft.AutoInject.Tests.csproj | 4 ++-- .../src/auto_connect/AutoConnector.cs | 12 ++++++------ .../src/auto_inject/dependent/DependencyResolver.cs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj b/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj index 3f9efca..76dd1b8 100644 --- a/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj +++ b/Chickensoft.AutoInject.Tests/Chickensoft.AutoInject.Tests.csproj @@ -26,7 +26,7 @@ - - + + diff --git a/Chickensoft.AutoInject.Tests/src/auto_connect/AutoConnector.cs b/Chickensoft.AutoInject.Tests/src/auto_connect/AutoConnector.cs index a00e673..34add58 100644 --- a/Chickensoft.AutoInject.Tests/src/auto_connect/AutoConnector.cs +++ b/Chickensoft.AutoInject.Tests/src/auto_connect/AutoConnector.cs @@ -48,7 +48,7 @@ IAutoConnect autoConnect // type. _checker.Value = fakeNode; - property.GenericType.GenericTypeGetter(_checker); + property.TypeNode.GenericTypeGetter(_checker); var satisfiesFakeType = _checker.Result; @@ -56,7 +56,7 @@ IAutoConnect autoConnect e = new InvalidOperationException( $"Found a faked node at '{path}' of type " + $"'{fakeNode.GetType().Name}' that is not the expected type " + - $"'{property.GenericType.ClosedType}' for member " + + $"'{property.TypeNode.ClosedType}' for member " + $"'{property.Name}' on '{node.Name}'." ); GD.PushError(e.Message); @@ -77,7 +77,7 @@ IAutoConnect autoConnect e = new InvalidOperationException( $"AutoConnect: Node at '{path}' does not exist in either the real " + $"or fake subtree for '{node.Name}' member '{property.Name}' of " + - $"type '{property.GenericType.ClosedType}'." + $"type '{property.TypeNode.ClosedType}'." ); GD.PushError(e.Message); throw e; @@ -86,7 +86,7 @@ IAutoConnect autoConnect // see if the unchecked node satisfies the expected type of node from the // property type _checker.Value = child; - property.GenericType.GenericTypeGetter(_checker); + property.TypeNode.GenericTypeGetter(_checker); var originalNodeSatisfiesType = _checker.Result; if (originalNodeSatisfiesType) { @@ -106,7 +106,7 @@ IAutoConnect autoConnect var adaptedChild = GodotInterfaces.AdaptNode(child); _checker.Value = adaptedChild; - property.GenericType.GenericTypeGetter(_checker); + property.TypeNode.GenericTypeGetter(_checker); var adaptedChildSatisfiesType = _checker.Result; if (adaptedChildSatisfiesType) { @@ -119,7 +119,7 @@ IAutoConnect autoConnect // Tell user we can't connect the node to the property. e = new InvalidOperationException( $"Node at '{path}' of type '{child.GetType().Name}' does not " + - $"satisfy the expected type '{property.GenericType.ClosedType}' for " + + $"satisfy the expected type '{property.TypeNode.ClosedType}' for " + $"member '{property.Name}' on '{node.Name}'." ); GD.PushError(e.Message); diff --git a/Chickensoft.AutoInject.Tests/src/auto_inject/dependent/DependencyResolver.cs b/Chickensoft.AutoInject.Tests/src/auto_inject/dependent/DependencyResolver.cs index c097774..f7520aa 100644 --- a/Chickensoft.AutoInject.Tests/src/auto_inject/dependent/DependencyResolver.cs +++ b/Chickensoft.AutoInject.Tests/src/auto_inject/dependent/DependencyResolver.cs @@ -230,13 +230,13 @@ void onProviderInitialized(IBaseProvider provider) { // Use the generated introspection metadata to determine if // we have found the correct provider for the dependency. - property.GenericType.GenericTypeGetter(Validator); + property.TypeNode.GenericTypeGetter(Validator); var isCorrectProvider = Validator.Result; if (isCorrectProvider) { // Add the provider to our internal dependency table. state.Dependencies.Add( - property.GenericType.ClosedType, provider + property.TypeNode.ClosedType, provider ); // Mark this dependency to be removed from the list of dependencies