Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ActivatorUtilities Class
Definition
- Namespace:
- Microsoft.Extensions.DependencyInjection
- Assembly:
- Microsoft.Extensions.DependencyInjection.Abstractions.dll
- Package:
- Microsoft.Extensions.DependencyInjection.Abstractions v11.0.0-preview.5.26302.115
- Source:
- ActivatorUtilities.cs
- Source:
- ActivatorUtilities.cs
- Source:
- ActivatorUtilities.cs
- Source:
- ActivatorUtilities.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Helper code for the various activator services.
public ref class ActivatorUtilities abstract sealed
public static class ActivatorUtilities
type ActivatorUtilities = class
Public Class ActivatorUtilities
- Inheritance
-
ActivatorUtilities
Methods
| Name | Description |
|---|---|
| CreateFactory(Type, Type[]) |
Creates a delegate that will instantiate a type with constructor arguments provided directly and/or from an IServiceProvider. |
| CreateFactory<T>(Type[]) |
Creates a delegate that will instantiate a type with constructor arguments provided directly and/or from an IServiceProvider. |
| CreateInstance(IServiceProvider, Type, Object[]) |
Instantiates a type with constructor arguments provided directly and/or from an IServiceProvider. |
| CreateInstance<T>(IServiceProvider, Object[]) |
Instantiates a type with constructor arguments provided directly and/or from an IServiceProvider. |
| GetServiceOrCreateInstance(IServiceProvider, Type) |
Retrieve an instance of the given type from the service provider. If one is not found then instantiate it directly. |
| GetServiceOrCreateInstance<T>(IServiceProvider) |
Retrieve an instance of the given type from the service provider. If one is not found then instantiate it directly. |
Applies to
Feedback
Was this page helpful?
