Arash.Web.DependencyResolution.SmDependencyResolver.GetService C# (CSharp) Method

GetService() public method

public GetService ( Type serviceType ) : object
serviceType System.Type
return object
        public object GetService(Type serviceType)
        {
            if (serviceType == null) return null;
            try
            {
                return serviceType.IsAbstract || serviceType.IsInterface
                         ? _container.TryGetInstance(serviceType)
                         : _container.GetInstance(serviceType);
            }
            catch
            {

                return null;
            }
        }