Class SystemProperties
Helper for environment variables. This class helps to convert the environment variables to int or bool data types and also silently handles read permission errors.
For instructions how to set environment variables for your OS, see https://www.schrodinger.com/kb/1842.
Note that if you want to load any of these settings for your application from a configuration file, it is recommended your application load them at startup and call SetProperty(String, String) to set them.
Set the environment variable lucene.ignoreSecurityExceptions
to false
to change the read behavior of these methods to throw the underlying exception
instead of returning the default value.
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public static class SystemProperties : object
Methods
Name | Description |
---|---|
GetProperty(String) | Retrieves the value of an environment variable from the current process. |
GetProperty(String, String) | Retrieves the value of an environment variable from the current process, with a default value if it doens't exist or the caller doesn't have permission to read the value. |
GetPropertyAsBoolean(String) | Retrieves the value of an environment variable from the current process
as |
GetPropertyAsBoolean(String, Boolean) | Retrieves the value of an environment variable from the current process as |
GetPropertyAsInt32(String) | Retrieves the value of an environment variable from the current process
as |
GetPropertyAsInt32(String, Int32) | Retrieves the value of an environment variable from the current process as |
SetProperty(String, String) | Creates, modifies, or deletes an environment variable stored in the current process. |