VContainer icon indicating copy to clipboard operation
VContainer copied to clipboard

Added a TryResolve method to IObjectResolver

Open AlonTalmi opened this issue 1 year ago • 1 comments

I added to IObjectResolver the method: bool TryResolve(Type type, out object resolved);

And also added 2 extension methods: TryResolve<T> T TryResolveOrDefault<T>(T defaultValue = default)

I also implemented it in EntryPointDispatcher because it used try-catch to mimic TryResolve

And added few simple unit test (copied from the default resolve method unit tests)

Also allows to add an Optional inject attribute

AlonTalmi avatar Nov 30 '23 15:11 AlonTalmi

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vcontainer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 3:55pm

vercel[bot] avatar Nov 30 '23 15:11 vercel[bot]

👍

hadashiA avatar Apr 02 '24 12:04 hadashiA

Merged in #656

hadashiA avatar Apr 04 '24 05:04 hadashiA