Skip to content

Commit

Permalink
chore: removing FinalizeExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jan 4, 2024
1 parent 86d52d8 commit 899eb64
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/Forms/Prism.Forms/PrismApplicationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected virtual void ConfigureViewModelLocator()
{
ViewModelLocationProvider.SetDefaultViewModelFactory((view, type) =>
{
List<(Type Type, object Instance)> overrides = new List<(Type, object)>();
List<(Type Type, object Instance)> overrides = [];
if (Container.IsRegistered<IResolverOverridesHelper>())
{
var resolver = Container.Resolve<IResolverOverridesHelper>();
Expand Down Expand Up @@ -148,8 +148,6 @@ protected virtual void Initialize()
PlatformInitializer?.RegisterTypes(_containerExtension);
RegisterTypes(_containerExtension);

_containerExtension.FinalizeExtension();

_moduleCatalog = Container.Resolve<IModuleCatalog>();
ConfigureModuleCatalog(_moduleCatalog);
}
Expand Down
10 changes: 5 additions & 5 deletions src/Maui/Prism.Maui/PrismAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public sealed class PrismAppBuilder

internal PrismAppBuilder(IContainerExtension containerExtension, MauiAppBuilder builder)
{
if (containerExtension is null)
throw new ArgumentNullException(nameof(containerExtension));
ArgumentNullException.ThrowIfNull(containerExtension);
ArgumentNullException.ThrowIfNull(builder);

_container = containerExtension;
_registrations = new List<Action<IContainerRegistry>>();
_initializations = new List<Action<IContainerProvider>>();
_registrations = [];
_initializations = [];

ViewModelCreationException.SetViewNameDelegate(view =>
{
Expand Down Expand Up @@ -89,7 +89,7 @@ internal PrismAppBuilder(IContainerExtension containerExtension, MauiAppBuilder
/// </summary>
public MauiAppBuilder MauiBuilder { get; }

private void ConfigureViewModelLocator()
private static void ConfigureViewModelLocator()
{
ViewModelLocationProvider.SetDefaultViewToViewModelTypeResolver(view =>
{
Expand Down
1 change: 0 additions & 1 deletion src/Uno/Prism.Uno/PrismApplicationBase.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ protected virtual void Initialize(IApplicationBuilder builder)
_containerExtension.RegisterInstance(builder.Window);
RegisterRequiredTypes(_containerExtension);
RegisterTypes(_containerExtension);
_containerExtension.FinalizeExtension();

ConfigureModuleCatalog(Container.Resolve<IModuleCatalog>());

Expand Down
1 change: 0 additions & 1 deletion src/Wpf/Prism.Wpf/PrismApplicationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ protected virtual void Initialize()
_moduleCatalog = CreateModuleCatalog();
RegisterRequiredTypes(_containerExtension);
RegisterTypes(_containerExtension);
_containerExtension.FinalizeExtension();

ConfigureModuleCatalog(_moduleCatalog);

Expand Down
1 change: 0 additions & 1 deletion src/Wpf/Prism.Wpf/PrismBootstrapperBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ protected virtual void Initialize()
_moduleCatalog = CreateModuleCatalog();
RegisterRequiredTypes(_containerExtension);
RegisterTypes(_containerExtension);
_containerExtension.FinalizeExtension();

ConfigureModuleCatalog(_moduleCatalog);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ static ContainerProviderExtensionFixture()
{
_containerExtension.RegisterInstance<IService>(kvp.Value, kvp.Key);
}
_containerExtension.FinalizeExtension();
}

public ContainerProviderExtensionFixture()
Expand Down

0 comments on commit 899eb64

Please sign in to comment.