Core/CafeLib.Core.IoC/ServiceResolverExtensions.cs
/// <summary>
/// Resolve the specified service type.
/// </summary>
/// <returns>the service object</returns>
Resolve the specified service type.
Resolve the specified service type .
public static bool TryResolve(this IServiceResolver resolver, Type type, out object value)
        {
            try
            {
                value = resolver.Resolve(type);
                return true;
            }
            catch
            {
                value = default;
                return false;
            }
        }
public static bool TryResolve ( this IServiceResolver resolver , Type type , out object value ) { try { value = resolver . Resolve ( type ) ; return true ; } catch { value = default ; return false ; } }
Resolve the specified service type.
Resolve the specified service type .
the service object
the service object
IServiceResolver
this
type
Type
object
out