Merge pull request #3956 from sbwalker/dev
add IClientService support to .NET MAUI
This commit is contained in:
		| @ -255,6 +255,16 @@ public static class MauiProgram | ||||
|                     services.AddScoped(serviceType ?? implementationType, implementationType); | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             implementationTypes = assembly.GetInterfaces<IClientService>(); | ||||
|             foreach (var implementationType in implementationTypes) | ||||
|             { | ||||
|                 if (implementationType.AssemblyQualifiedName != null) | ||||
|                 { | ||||
|                     var serviceType = Type.GetType(implementationType.AssemblyQualifiedName.Replace(implementationType.Name, $"I{implementationType.Name}")); | ||||
|                     services.AddScoped(serviceType ?? implementationType, implementationType); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         catch | ||||
|         { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker