• Api Documentation
Show / Hide Table of Contents
  • Softadmin.Api
    • AdminMessageException
    • CustomComponent
    • ICookies
    • ICredentialsStore
    • IEnvironment
    • IForwardState
    • IHttpHeaders
    • IParameters
    • ISessionVariables
    • ISystemSettings
    • Plugin
  • Softadmin.Api.Database
    • IDbRequest
    • IDbRequestFactory
  • Softadmin.Api.Diagnostics
    • ILogger
  • Softadmin.Api.Login
    • IUserState
    • LoginPlugin
    • PostLoginPlugin
    • PreLoginPlugin
    • UserAuthenticationPlugin
  • Softadmin.Api.Logout
    • LogoutPlugin
  • Softadmin.Api.Page
    • ICustomPage
    • PagePlugin
  • Softadmin.Api.Ui
    • IDebugWindow
    • IProgressWindow

Interface IEnvironment

Exposes information about the Softadmin® system.

Namespace: Softadmin.Api
Assembly: Softadmin.Api.dll
Syntax
public interface IEnvironment

Properties

ConnectionString

Gets a connection string that you can use to communicate directly with the database, bypassing the IDbRequestFactory.

Declaration
string ConnectionString { get; }
Property Value
Type Description
System.String
Remarks

When communicating directly with the database, it is critical that you remember to dispose of the connection, preferably by wrapping it in a using-statement.

Examples
using (var connection = new SqlConnection(this.Environment.ConnectionString))
{
    connection.Open();
    using (var bulkCopy = new SqlBulkCopy(connection))
    {
        // Your code here
    }
}

PluginsPath

Gets the path to the plugins directory of the web application.

Declaration
string PluginsPath { get; }
Property Value
Type Description
System.String

RequestHost

Gets the host component of the current request URL.

Declaration
string RequestHost { get; }
Property Value
Type Description
System.String
Remarks

This property is only set for login plugins. You can use it when login should vary behavior based on which binding the user accesses the system through.

RootPath

Gets the path to the root folder of the web application.

Declaration
string RootPath { get; }
Property Value
Type Description
System.String
In This Article
Back to top Generated by DocFX