Initializing help system before first use

XPRM Class

Methods for initialisation as well as model compilation and loading of compiled models into Mosel.
Inheritance Hierarchy
SystemObject
   MoselXPRM

Namespace:  Mosel
Assembly: xprmdn (in xprmdn.dll) Version: 6.10.1+ae0383562d99c01e2c5cf01f00ce4c77953c414e
Syntax
C#
public class XPRM : XPRMObject, IDisposable

The XPRM type exposes the following members.

Properties
  Name Description
Public property IODrivers Get a list of all IO drivers
Public propertyStatic member IsEnvironmentInitialized Returns 'true' if there is a Mosel environment is currently initialized in this process. A Mosel environment will be initialized if there is any XPRM object that has not been disposed.
Public property Model Returns a reference to this XPRM model - this is 'null' for XPRM objects
Public property Modules Get an Collection to enumerate all loaded modules.
Public property Owner Returns a reference to this XPRM object - included to implement the XPRMObject interface.
Public property WorkDir Property representing the current default working directory for new Mosel models
Top
Methods
  Name Description
Public methodStatic member BeginLicensing Begins the OEM licensing procedure. Subsequent calls to BeginLicensing() from the same process will block until this thread calls EndLicensing(), whether or not BeginLicensing() returns true.
Public method Bind Bind an object to a name. This method is used to associate a name with an object; this name can then be used to locate the object from the 'dotnetstream' and 'dotnetraw' I/O drivers within a Mosel model. Binding an object also prevents it from being garbage collected until the name is unbound or another object is bound to this name, or until the XPRM object is disposed.
Public method Compile(String) Compile a model source file.
Public method Compile(String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, Stream, Stream) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, TextReader, Stream) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, Stream) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, Stream, Stream, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, TextReader, Stream, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, Stream, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, Stream, Stream, String, String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, TextReader, Stream, String, String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, Stream, String, String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method Compile(String, String, String, String, String, String, String) Compile a model source file. This method compiles a given model source file into a binary model file (bim file) that is required as input to method LoadModel(string) for loading the model. The output file takes the same name as the source file with the extension .bim. Note that the empty string (i.e. "") is interpreted as the standard input for src.
Public method CompileAndLoad(String) Compile a model source file into a memory buffer, then read it into an XPRMModel object
Public method CompileAndLoad(TextReader) Compile a model source into a memory buffer from the given stream, then read it into an XPRMModel object
Public method CompileAndLoad(String, TextReader) Compile a model source from the given stream into a memory buffer, then read it into an XPRMModel object
Public method CompileAndLoad(String, String) Compile a model source file into a memory buffer, then read it into an XPRMModel object
Public method CreateIOCallback(XPRMIOCallbackInput) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever Mosel needs to read data from the stream; you should return the data to Mosel in a byte array, up to the limit supplied by Mosel.
Public method CreateIOCallback(XPRMIOCallbackOutput) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever output is sent to the stream; your function can do with it as you wish (e.g. output it to the screen, write it to a file, display it in a window, etc etc etc...)
Public methodCode example CreateIOCallback(XPRMIOCallbackOutputText) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever output is sent to the stream; your function can do with it as you wish (e.g. output it to the screen, write it to a file, display it in a window, etc etc etc...) Note that the stream must be called with line-buffering enabled (ie F_OUTPUT_LINEBUF)
Public method CreateIOCallback(XPRMIOCallbackInput, Object) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever Mosel needs to read data from the stream; you should return the data to Mosel in a byte array, up to the limit supplied by Mosel.
Public method CreateIOCallback(XPRMIOCallbackOutput, Object) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever output is sent to the stream; your function can do with it as you wish (e.g. output it to the screen, write it to a file, display it in a window, etc etc etc...)
Public methodCode example CreateIOCallback(XPRMIOCallbackOutputText, Object) This returns the name of an IO driver callback stream. The supplied delegate will be called whenever output is sent to the stream; your function can do with it as you wish (e.g. output it to the screen, write it to a file, display it in a window, etc etc etc...) Note that the stream must be called with line-buffering enabled (ie F_OUTPUT_LINEBUF)
Public method DestroyIOCallback You should call this method when you have finished using an IO driver callback stream name returned by CreateIOCallback. If you do not do this, resources associated with this callback will not be garbage-collected until the XPRM object is disposed. Mosel must not try to access a IO driver callback after its name is passed to this function.
Public method Dispose Closes down Mosel, deallocating all models and resources. By default this will happen when the XPRM object is garbage-collected, but you can invoke the method explicitly if you want to control when Mosel is unloaded. Note that you must call Dispose() on every object returned by XPRM.Init() if you want to guarantee that the license is released.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the XPRM and optionally releases the managed resources
Public methodStatic member EndLicensing Ends the OEM licensing procedure. Must always be called the same number of times as BeginLicensing().
Public method Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public method ExpandPath Generates an absoute path, taking into account the current working directory and the 'tmp:' IO driver.
Protected method Finalize Closes the object, and unloads the Mosel interface.
(Overrides ObjectFinalize)
Public method FindModule Find a module by its name. This method searches for a module of the given name. The module must be loaded in memory.
Public method FlushModules Unload unused modules. See also SetAutoUnloadModules(Boolean)
Public method GetHashCode Serves as the default hash function.
(Inherited from Object)
Public method GetLocaleDir obtain the location of the translated messages. This function can be used to specify the location of the translated messages (native language support) if they are not stored in the usual place.
Public method GetModulesPath Get the directory list where modules are searched for. Note that the returned path includes both the default search path (MOSEL/dso,XPRESSDIR/dso) and the path set up either via the environment variable MOSEL_DSO or the method setModulesPath(string).
Public method GetType Gets the Type of the current instance.
(Inherited from Object)
Public method GetVersion Get Mosel version.
Public method GetVersion(XPRMVersionType) Get version information. This function returns the version number of Mosel, the Native Interface or BIM file format.
Public methodStatic member Init Return an XPRM object and initialise Mosel (if necessary) This method must be called first in order to use the library.
Public methodStatic member License(String) Generate a license object. This method initiates the OEM licensing procedure. You must then modify the 'Number' field of the returned XPRMLicense with your OEM license key, using the formula described for 'nvalue' in the OEM user guide, before calling XPRM.License(XPRMLicense).
Public methodStatic member License(XPRMLicense) Check license. This method is used for checking an OEM License. On return, the 'Message' field of the XPRMLicense object will contain your OEM string.
Public methodStatic member License(Int32, String) Deprecated. Use XPRM.License(string) instead.
Public method LoadModel(Stream) Load a compiled model into memory. This method loads a compiled model (Binary Model file) from a Stream into memory. While loading a model from a stream, Mosel also automatically opens any additional modules that are required by this model.
Public method LoadModel(String) Load a compiled model into memory. This method loads a compiled model (Binary Model file) into memory. While loading a model from a file, Mosel also automatically opens any additional modules that are required by this model.
Public method LoadModel(Stream, String, String, String, String) Load a compiled model into memory. This method loads a compiled model (Binary Model file) from a stream into memory. While loading a model from a stream, Mosel also automatically opens any additional modules that are required by this model.
Public method LoadModel(String, String, String, String, String) Load a compiled model into memory. This method loads a compiled model (Binary Model file) into memory. While loading a model from a file, Mosel also automatically opens any additional modules that are required by this model.
Public method LoadModule Explicitly load a module. Mosel loads modules on demand when they are required by the models in core memory. However, it is possible to force the system to load a module using this function.
Protected method MemberwiseClone Creates a shallow copy of the current Object.
(Inherited from Object)
Public method RemoveTmpDir Remove the Mosel workspace temporary directory and any files within it
Public method SetAutoUnloadModules Disable or enable automatic unloading of modules. By default, each unused module is automatically unloaded after a fixed period of time. Using this function it is possible to disable this automatic unloading; in which case, unused modules have to be unloaded explicitly using FlushModules
Public method SetDefaultStream(XPRMStreamType, TextReader) Set default input/output streams. This method defines the default global streams: they are used as the default when a model is loaded and whenever no model information is available (e.g. compilation errors, error on modules, etc). The method can be used only if no model is currently loaded in memory.
Public method SetDefaultStream(XPRMStreamType, TextWriter) Set default input/output streams. This method defines the default global streams: they are used as the default when a model is loaded and whenever no model information is available (e.g. compilation errors, error on modules, etc). The method can be used only if no model is currently loaded in memory.
Public method SetDefaultStream(XPRMStreamType, String) Set default input/output streams. This method defines the default global streams: they are used as the default when a model is loaded and whenever no model information is available (e.g. compilation errors, error on modules, etc). The method can be used only if no model is currently loaded in memory. Using an empty string as the file name implies resetting to the corresponding original default stream.
Public method SetLocaleDir Set the location of the translated messages. This function can be used to specify the location of the translated messages (native language support) if they are not stored in the usual place.
Public method SetModulesPath Set the directory list where modules are stored. By default, Mosel looks for its modules in the directories defined by the environment variable MOSEL_DSO, in MOSEL/dso and then in XPRESSDIR/dso. This function may be used to replace the directory list defined by MOSEL_DSO. Note that the directory separator is ':' under Unix (e.g. "/opt/Mosel/dso:/tmp") and ';' under Win32 (e.g. "E:\Mosel\Dso;C:\Temp").
Public method ToString Returns a string that represents the current object.
(Inherited from Object)
Public method Unbind Unbinds the object associated with this name; the object can now be garbage collected (if no other references to it exist), and can no longer be referred to by this name from the 'dotnetstream' or 'dotnetraw' I/O drivers. This method should be called once a name is not to be used again in Mosel.
Top
See Also

Reference

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.