Class ProductSourceUtils
Product Source utility class.
Namespace: Unity.Industrial.Forma.Core.AddressableSources
Syntax
[MovedFrom(true, "UnityEngine.Industrial.Configuring.ConfiguratorRuntime", "Unity.Industrial.Configurator", null)]
public static class ProductSourceUtils
Methods
FindAndDestroyFormaManagedProductSource<T>(Configurator)
Find and delete the product source of type T (if exist)
Declaration
public static void FindAndDestroyFormaManagedProductSource<T>(Configurator configurator)
where T : IProductSource
Parameters
Type | Name | Description |
---|---|---|
Configurator | configurator |
Type Parameters
Name | Description |
---|---|
T |
FindOrCreateFormaManagedProductSource<T>(Configurator)
Return the first IProductSource of type T found or create and return a new IProductSource of type T.
Declaration
public static T FindOrCreateFormaManagedProductSource<T>(Configurator configurator)
where T : IProductSource
Parameters
Type | Name | Description |
---|---|---|
Configurator | configurator | Configurator to check for IProductSource |
Returns
Type | Description |
---|---|
T | IProductSource found |
Type Parameters
Name | Description |
---|---|
T | IProductSource type |
FindOrCreateFormaManagedProductSource<T>(Configurator, out T)
Return the first IProductSource of type T found or create and return a new IProductSource of type T.
Declaration
public static bool FindOrCreateFormaManagedProductSource<T>(Configurator configurator, out T productSource)
where T : IProductSource
Parameters
Type | Name | Description |
---|---|---|
Configurator | configurator | Configurator to check for IProductSource |
T | productSource | Returns the Product source |
Returns
Type | Description |
---|---|
Boolean | True if existing IProductSource was found. False if the product source was created. |
Type Parameters
Name | Description |
---|---|
T | Product Source type |
Exceptions
Type | Condition |
---|---|
NullReferenceException | Invalid type |