introduce a TransientNavigationStore to share objects from one state to the next state

This commit is contained in:
TheXamlGuy
2024-10-08 15:12:50 +01:00
parent 12ed99f191
commit f809f3d221
9 changed files with 224 additions and 173 deletions
+4 -3
View File
@@ -1,9 +1,10 @@
namespace Toolkit.Foundation;
public class ContentFactory(IServiceProvider provider,
IServiceFactory factory) : IContentFactory
IServiceFactory factory) :
IContentFactory
{
public Task<object?> CreateAsync(IContentTemplateDescriptor descriptor,
public object? Create(IContentTemplateDescriptor descriptor,
object[] parameters)
{
object? content = parameters is { Length: > 0 }
@@ -22,6 +23,6 @@ public class ContentFactory(IServiceProvider provider,
}
}, descriptor.Key);
return Task.FromResult<object?>(content);
return content;
}
}