Aracılığıyla paylaş


ServiceCollectionServiceExtensions.AddTransient Yöntem

Tanım

Aşırı Yüklemeler

AddTransient(IServiceCollection, Type)

belirtilen serviceType türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>)

içinde belirtilen bir fabrika implementationFactory ile belirtilen serviceType türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

AddTransient(IServiceCollection, Type, Type)

belirtilen türündeki geçici bir hizmeti, içinde belirtilen serviceTypeimplementationType türün uygulamasıyla belirtilen IServiceCollectionöğesine ekler.

AddTransient<TService,TImplementation>(IServiceCollection)

belirtilen türündeki geçici bir hizmeti, içinde belirtilen TServiceTImplementation bir uygulama türüyle belirtilen IServiceCollectionöğesine ekler.

AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

içinde belirtilen TService fabrikayı implementationFactory kullanarak belirtilen uygulama türüyle TImplementation belirtilen türde geçici bir hizmet ekler.IServiceCollection

AddTransient<TService>(IServiceCollection)

belirtilen TService türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>)

içinde belirtilen bir fabrika implementationFactory ile belirtilen TService türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

AddTransient(IServiceCollection, Type)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

belirtilen serviceType türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType);
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTransient (services As IServiceCollection, serviceType As Type) As IServiceCollection

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

serviceType
Type

Kaydedilecek hizmetin türü ve kullanılacak uygulama.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

içinde belirtilen bir fabrika implementationFactory ile belirtilen serviceType türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType, Func<IServiceProvider ^, System::Object ^> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType, Func<IServiceProvider,object> implementationFactory);
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * Func<IServiceProvider, obj> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTransient (services As IServiceCollection, serviceType As Type, implementationFactory As Func(Of IServiceProvider, Object)) As IServiceCollection

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

serviceType
Type

Kaydedilecek hizmetin türü.

implementationFactory
Func<IServiceProvider,Object>

Hizmeti oluşturan fabrika.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient(IServiceCollection, Type, Type)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

belirtilen türündeki geçici bir hizmeti, içinde belirtilen serviceTypeimplementationType türün uygulamasıyla belirtilen IServiceCollectionöğesine ekler.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType, Type ^ implementationType);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType, Type implementationType);
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * Type -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTransient (services As IServiceCollection, serviceType As Type, implementationType As Type) As IServiceCollection

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

serviceType
Type

Kaydedilecek hizmetin türü.

implementationType
Type

Hizmetin uygulama türü.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient<TService,TImplementation>(IServiceCollection)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

belirtilen türündeki geçici bir hizmeti, içinde belirtilen TServiceTImplementation bir uygulama türüyle belirtilen IServiceCollectionöğesine ekler.

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient<TService,TImplementation> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class where TImplementation : class, TService;
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransient(Of TService As Class, TImplementation As Class) (services As IServiceCollection) As IServiceCollection

Tür Parametreleri

TService

Eklenecek hizmetin türü.

TImplementation

Kullanılacak uygulamanın türü.

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

içinde belirtilen TService fabrikayı implementationFactory kullanarak belirtilen uygulama türüyle TImplementation belirtilen türde geçici bir hizmet ekler.IServiceCollection

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<IServiceProvider ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient<TService,TImplementation> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<IServiceProvider,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, #'Service> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransient(Of TService As Class, TImplementation As Class) (services As IServiceCollection, implementationFactory As Func(Of IServiceProvider, TImplementation)) As IServiceCollection

Tür Parametreleri

TService

Eklenecek hizmetin türü.

TImplementation

Kullanılacak uygulamanın türü.

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

implementationFactory
Func<IServiceProvider,TImplementation>

Hizmeti oluşturan fabrika.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient<TService>(IServiceCollection)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

belirtilen TService türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class;
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransient(Of TService As Class) (services As IServiceCollection) As IServiceCollection

Tür Parametreleri

TService

Eklenecek hizmetin türü.

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır

AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs
Kaynak:
ServiceCollectionServiceExtensions.cs

içinde belirtilen bir fabrika implementationFactory ile belirtilen TService türündeki geçici bir hizmeti belirtilen IServiceCollectionöğesine ekler.

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddTransient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<IServiceProvider ^, TService> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<IServiceProvider,TService> implementationFactory) where TService : class;
static member AddTransient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransient(Of TService As Class) (services As IServiceCollection, implementationFactory As Func(Of IServiceProvider, TService)) As IServiceCollection

Tür Parametreleri

TService

Eklenecek hizmetin türü.

Parametreler

services
IServiceCollection

IServiceCollection hizmeti eklenecek.

implementationFactory
Func<IServiceProvider,TService>

Hizmeti oluşturan fabrika.

Döndürülenler

İşlem tamamlandıktan sonra bu örneğe başvuru.

Ayrıca bkz.

Şunlara uygulanır