<< Salience.GetDefaultSalienceLocation | Back to Salience 6 .Net Index | Salience.GetLastWarnings >>


Outputs environment information about the Salience session. This includes the data directory and user directory in use, as well as the value of any options that have been set.
This is a wrapper around the underlying C API method lxaDumpEnvironment.


public string DumpEnvironment()




A string containing the parameters of the operating environment of the current Salience session.


    //The SalienceEngine object wraps all of the Salience functionality 
    //and must be initialized to use the library.
    Salience Engine = null;

    //If this application will be run on multiple machines, it may be helpful to read these paths 
    //from a configuration file or a registry key to avoid introducing dependencies on where the 
    //license and data must be installed.
    string licensePath = "C:/Program Files/Lexalytics/License.v5";
    string dataPath = "C:/Program Files/Lexalytics/data";

        //We declared Engine before initializing it so we could put this in a try/catch block, and 
        //have the rest of the code outside.
        Engine = new Salience(licensePath, dataPath);
    catch (SalienceException e)
        /*If the SalienceEngine constructor throws an error, one of these is likely to be true:
         * 1) The license file is missing/invalid/out of date
         * 2) The data directory was missing or contained incorrect files
         * 3) Salience6.dll could not be found. */
        System.Console.WriteLine("Error Loading SalienceEngine: " + e.Message);


<< Salience.GetDefaultSalienceLocation | Back to Salience 6 .Net Index | Salience.GetLastWarnings >>