ActivatorUtilities Class
Definition
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
CreateFactory(Type, Type[]) |
Create 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 or from an IServiceProvider. |
CreateInstance(IServiceProvider, Type, Object[]) |
Instantiates a type with constructor arguments provided directly or from an IServiceProvider. |
CreateInstance<T>(IServiceProvider, Object[]) |
Instantiates a type with constructor arguments provided directly 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
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre