ConventionHostBuilderExtensions.

GetOrAdd<T>(IServiceProviderDictionary, Func<T>) Method

Summary

Get a value by key from the context

Syntax

public static T GetOrAdd<T>(this IServiceProviderDictionary serviceProviderDictionary, Func<T> factory) 
    where T : class

Attributes

Type Description
NotNullAttribute

Type Parameters

Name Description
T

Parameters

Name Type Description
serviceProviderDictionary IServiceProviderDictionary The properties
factory Func<T> The factory method in the event the type is not found

Return Value

Type Description
T T.