Show / Hide Table of Contents

Class WMModelBase

The asset class

Inheritance
object
WMAssetBase
WMModelBase
WMDecisionTree
WMNeuralNetwork
Implements
IWMExecutableAsset
IWMAsset
IDbEntity
IWMEntity
IDocumentedEntity
INamedEntity
IWMAssetDirectoryMember
IWMPrincipalOwned
IHasEncryptedValues
Inherited Members
WMAssetBase.ID
WMAssetBase.CreatedBy
WMAssetBase.CreatedDate
WMAssetBase.LastUpdatedBy
WMAssetBase.LastUpdatedDate
WMAssetBase.Name
WMAssetBase.Documentation
WMAssetBase.DocumentationMIMEType
WMAssetBase.Summary
WMAssetBase.ParentDirectory
WMAssetBase.FullPathName
WMAssetBase.Properties
WMAssetBase.Owner
WMAssetBase.OwnerID
WMAssetBase.OwnerType
WMAssetBase.Get<T>(WMPrincipal, string, WMAppDbContext)
WMAssetBase.GetSync<T>(string, string)
WMAssetBase.CreateFullPathName(WMAssetDirectory, string)
WMAssetBase.GetFullPath(WMPrincipal, string, string, WMAppDbContext)
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 class WMModelBase : WMAssetBase, IWMExecutableAsset, IWMAsset, IDbEntity, IWMEntity, IDocumentedEntity, INamedEntity, IWMAssetDirectoryMember, IWMPrincipalOwned, IHasEncryptedValues

Constructors

WMModelBase()

Parameterless Constructor. Will populate a random GUID as ID

Declaration
public WMModelBase()

WMModelBase(string)

Constructor that specifies ID

Declaration
public WMModelBase(string ID)
Parameters
Type Name Description
string ID

Properties

EncryptionPlaceholder

Standard string to replace encrypted values with when not returning plain-text values.

Declaration
[NotMapped]
public string EncryptionPlaceholder { get; set; }
Property Value
Type Description
string

RegisteredType

Determines the type of model that should be implemented

Declaration
public string RegisteredType { get; set; }
Property Value
Type Description
string

SourceFormat

Indicates what format the source string is in.

Declaration
public string SourceFormat { get; set; }
Property Value
Type Description
string

SourceMode

Indicates how to interpret the source string.

Declaration
public string SourceMode { get; set; }
Property Value
Type Description
string

SourceString

The source string containing a decision tree.

Declaration
public string SourceString { get; set; }
Property Value
Type Description
string

Methods

CacheModel(string, object)

Attempts to cache the given model to the memory cache.

Declaration
protected static void CacheModel(string ID, object model)
Parameters
Type Name Description
string ID

The ID to cache under

object model

The model to be cached

Execute(ElementValue)

Performs an execution on the model implemented in this WMModelBase

Declaration
public virtual ElementValue Execute(ElementValue parameters)
Parameters
Type Name Description
ElementValue parameters

A model specific parameter set.

Returns
Type Description
ElementValue

OnModelChanged(string)

Called whenever a WMModelBase is changed. This will cause the cached model to be deleted, if it exists.

Declaration
public static void OnModelChanged(string ID)
Parameters
Type Name Description
string ID

The key to search under

TryGetCachedModel<T>(string, out T)

Attempts to find the cached model with the given ID. If found, attempts to convert to the generic type and return.

Declaration
public static bool TryGetCachedModel<T>(string ID, out T model) where T : class
Parameters
Type Name Description
string ID

The ID the model is cached against

T model

The model to be returned.

Returns
Type Description
bool

True if the model is found, false if not.

Type Parameters
Name Description
T

The type of the model.

Implements

IWMExecutableAsset
IWMAsset
IDbEntity
IWMEntity
IDocumentedEntity
INamedEntity
IWMAssetDirectoryMember
IWMPrincipalOwned
IHasEncryptedValues
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