Class ServiceFactoryExtensions
Extensions for ServiceFactory.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Events
Assembly: Umbraco.Core.dll
Syntax
public static class ServiceFactoryExtensions
Methods
View SourceGetInstance<T>(ServiceFactory)
Gets an instance of T.
Declaration
public static T GetInstance<T>(this ServiceFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| ServiceFactory | factory | The service factory. |
Returns
| Type | Description |
|---|---|
| T | The new instance. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to return. |
GetInstances<T>(ServiceFactory)
Gets a collection of instances of T.
Declaration
public static IEnumerable<T> GetInstances<T>(this ServiceFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| ServiceFactory | factory | The service factory. |
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | The new instance collection. |
Type Parameters
| Name | Description |
|---|---|
| T | The collection item type to return. |