Interface IServerEnvironment
- Namespace
- ESRI.ArcGIS.esriSystem
- Assembly
- ESRI.Server.System.dll
Provides access to Server configuration information.
[Guid("32D4C328-E473-4615-922C-63C108F55E60")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IServerEnvironment
Remarks
This interface is primarily used when developing server object extensions. It permits access to an ILog interface which provides a conduit to log messages. It also retrieves the server properties as an IPropertySet interface. This PropertySet can be used to determine various properties, for example, output and input operating system paths, that might be useful to a server object extension programmer.
// Set reference to GUID for esriServer.IServerEnvironment UID uid = new UIDClass(); uid.Value = "32D4C328-E473-4615-922C-63C108F55E60";// CoCreate an EnvironmentManager and retrieve the IServerEnvironment IEnvironmentManager environmentManager = new EnvironmentManager() as IEnvironmentManager; IServerEnvironment serverEnvironment = environmentManager.getEnvironment(uid);
// Get log and server properties. ILog log = serverEnvironment.Log; IPropertySet propertySet = serverEnvironment.Properties;
' Set reference to GUID for esriServer.IServerEnvironment Dim uid As UID = New UIDClass() uid.Value = "32D4C328-E473-4615-922C-63C108F55E60" ' CoCreate an EnvironmentManager and retrieve the IServerEnvironment Dim environmentManager As IEnvironmentManager = New TryCast(EnvironmentManager(), IEnvironmentManager) Dim serverEnvironment As IServerEnvironment = environmentManager.getEnvironment(uid) ' Get log and server properties. Dim log As ILog = serverEnvironment.Log Dim propertySet As IPropertySet = serverEnvironment.Properties
Properties
CurrentJobID
Retrieves current job ID.
string CurrentJobID { get; }
Property Value
JobDirectory[string]
Retrieves job directory for given job.
string JobDirectory[string JobID] { get; }
Parameters
JobIDstring
Property Value
JobTracker
Retrieves IJobTracker interface that provides access to members that track and control execution of jobs.
IJobTracker JobTracker { get; }
Property Value
Log
Retrieves an ILog interface that can be used to add logging messages.
ILog Log { get; }
Property Value
Properties
Retrieves an IProperySet interface that provides access to the server configuration information.
IPropertySet Properties { get; }