src/Autofac/Core/Lifetime/LifetimeScope.cs
/// <summary>
/// Gets the service object of the specified type.
/// </summary>
/// <param name="serviceType">An object that specifies the type of service object
/// to get.</param>
/// <returns>
/// A service object of type <paramref name="serviceType"/>.-or- null if there is
/// no service object of type <paramref name="serviceType"/>.
/// </returns>
Gets the service object of the specified type.
Gets the service object of the specified type .
public object? GetService(Type serviceType)
        {
            if (serviceType == null) throw new ArgumentNullException(nameof(serviceType));
            return this.ResolveOptional(serviceType);
        }
public object ? GetService ( Type serviceType ) { if ( serviceType == null ) throw new ArgumentNullException ( nameof ( serviceType ) ) ; return this . ResolveOptional ( serviceType ) ; }
Gets the service object of the specified type.
Gets the service object of the specified type .
A service object of type .-or- null if there is
no service object of type .
A service object of type . - or - null if there is no service object of type .
serviceType
Type
An object that specifies the type of service object
to get.
An object that specifies the type of service object to get .