Skip to content
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

Add group Alias #13

Merged
merged 2 commits into from
Jul 8, 2020
Merged

Add group Alias #13

merged 2 commits into from
Jul 8, 2020

Conversation

hadashiA
Copy link
Owner

@hadashiA hadashiA commented Jul 8, 2020

Enabled to group the type declarations that are specially treatment.

Before

builder.RegisterEntryPoint<ActorPresenter>(Lifetime.Scoped);
builder.RegisterEntryPoint<GroundPresenter>(Lifetime.Scoped);
builder.RegisterEntryPoint<FieldUIPresenter>(Lifetime.Scoped);

builder.RegisterComponent(groundInScene);
builder.RegisterComponentInHierarchy<GroundGrid>();
builder.RegisterComponentInHierarchy<FukidashiPanel>();
builder.RegisterComponentInHierarchy<TextSnapshotGenerator>();
builder.RegisterComponentInHierarchy<KimochiPopup>();
builder.RegisterComponentInHierarchy<DirectionSign>();

builder.RegisterInstance(mainCamera);
builder.Register<ActorContainer>(Lifetime.Scoped);

builder.RegisterContainer();

After

builder.UseEntryPoints(Lifetime.Scoped, entryPoints =>
{
    entryPoints.Add<ActorPresenter>();
    entryPoints.Add<GroundPresenter>();
    entryPoints.Add<FieldUIPresenter>();
});

builder.UseComponents(components =>
{
    components.AddInstance(groundInScene);
    components.AddInHierarchy<GroundGrid>();
    components.AddInHierarchy<FukidashiPanel>();
    components.AddInHierarchy<TextSnapshotGenerator>();
    components.AddInHierarchy<KimochiPopup>();
    components.AddInHierarchy<DirectionSign>();
});

builder.RegisterInstance(mainCamera);
builder.Register<ActorContainer>(Lifetime.Scoped);

builder.RegisterContainer();

@hadashiA hadashiA merged commit 46da44c into master Jul 8, 2020
@hadashiA hadashiA deleted the ku/block-alias branch July 8, 2020 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant