Click or drag to resize

NeonService Methods

The NeonService type exposes the following members.

Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Releases all associated resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExit
Used by services to stop themselves, specifying an optional process exit code.
Protected methodFinalize
(Overrides ObjectFinalize.)
Public methodGetConfigFilePath
Returns the physical path for the confguration file whose logical path is specified.
Public methodGetEnvironmentVariable
Returns the value of an environment variable.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLoadEnvironmentVariables

Loads environment variables formatted as NAME=VALUE from a text file as service environment variables. The file will be decrypted using NeonVault if necessary.

Note Note
Blank lines and lines beginning with '#' will be ignored.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnRunAsync
Called to actually implement the service.
Public methodRunAsync
Starts the service if it's not already running. This will call OnRunAsync, which is your code that actually implements the service. Note that any service dependencies specified by Dependencies will be verified as ready before OnRunAsync will be called.
Public methodSetArguments
Initializes Arguments with the command line arguments passed.
Public methodSetConfigFile(String, Byte)
Maps a logical configuration file path to a temporary file holding the byte contents passed. This is typically used initializing confguration files for unit testing.
Public methodSetConfigFile(String, String, Boolean)
Maps a logical configuration file path to a temporary file holding the string contents passed encoded as UTF-8. This is typically used for initializing confguration files for unit testing.
Public methodSetConfigFilePath
Maps a logical configuration file path to an actual file on the local machine. This is used for unit testing to map a file on the local workstation to the path where the service expects the find to be.
Public methodSetEnvironmentVariable
Sets or deletes a service environment variable.
Public methodSetRunningAsync
Called by OnRunAsync implementation after they've completed any initialization and are ready for traffic. This sets Status to Running.
Public methodSetStatusAsync
Updates the service status. This is typically called internally by this class but service code may set this to Unhealthy when there's a problem and back to Running when the service is healthy again.
Public methodStop

Stops the service if it's not already stopped. This is intended to be called by external things like unit test fixtures and is not intended to be called by the service itself.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also