Skip to content

[Feature] Suggested add Container.OnPrebuilt event. #205

@ymh199478

Description

@ymh199478

Suggested add Container.OnPrebuilt event.
This event can be very useful when creating features like object pools.

This event is triggered before the Build occurs

If the first event returns a value, then this value will be treated as an object instance. Subsequent OnPrebuilt events will not be triggered.

OnExtend, OnResolving, OnResolvingAfter event will be triggered normally.

  • Suggested API:
public IContainer OnPreBuilt(Func<IBindData, object, object> closure);

or

protected virtual object PreBuilt(BindData makeServiceBindData, object[] userParams);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions