Show / Hide Table of Contents

Class WMModelFactory

Factory class for dynamically creating new instances of WMModelBase

Inheritance
object
WMModelFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.MLModel
Assembly: WMServer.dll
Syntax
public static class WMModelFactory

Methods

Create(string, string?)

Create a new instance of the specified type, if it exists, otherwise throws an exception. Will register all available data source types prior to instance creation, if necessary.

Declaration
public static WMModelBase Create(string type, string? data = null)
Parameters
Type Name Description
string type

The name that was used to register the type in RegisterWMModelType(string, Type)

string data

Optional string to specify initialization information for the model.

Returns
Type Description
WMModelBase

RegisterModels()

Registers all currently offered model types on its first call. Subsequent calls to RegisterModels() does nothing.

Declaration
public static void RegisterModels()

RegisterWMModelType(string, Type)

Registers a model type to an associated key.

Declaration
public static void RegisterWMModelType(string nameKey, Type type)
Parameters
Type Name Description
string nameKey

The name used to register the type

Type type

The type being registered. This must implement the WMModelBase base class.

Remarks

If the registered nameKey already exists, it will be replaced by the type and value specified in this call.

RegisteredTypeExists(string)

Returns whether the specified registered type exists. Will register all available model types, if necessary.

Declaration
public static bool RegisteredTypeExists(string type)
Parameters
Type Name Description
string type
Returns
Type Description
bool
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE