Core/CafeLib.Core.IoC/ServiceResolverExtensions.cs
/// <summary>
/// Resolve the specified service type.
/// </summary>
/// <typeparam name="T">service type</typeparam>
/// <returns>the service object</returns>
Resolve the specified service type.
Resolve the specified service type .
public static bool TryResolve<T>(this IServiceResolver resolver, out T value) where T : class
        {
            try
            {
                value = resolver.Resolve<T>();
                return true;
            }
            catch
            {
                value = default;
                return false;
            }
        }
public static bool TryResolve < T > ( this IServiceResolver resolver , out T value ) where T : class { try { value = resolver . Resolve < T > ( ) ; 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
T
out
typeparam
None