Search Results for

    Show / Hide Table of Contents

    Class ApplicationSettingsBase

    Utility class for application settings

    Inheritance
    System.Object
    ApplicationSettingsBase
    ApplicationSettings
    ApplicationSettings
    ApplicationSettings
    ApplicationSettings
    Namespace: ImageVault.Common.Configuration
    Assembly: ImageVault.Common.dll
    Syntax
    public class ApplicationSettingsBase : Object

    Constructors

    ApplicationSettingsBase(NameValueCollection)

    Creates the ApplicationSettingsBase class

    Declaration
    protected ApplicationSettingsBase(NameValueCollection appSettings = null)
    Parameters
    Type Name Description
    System.Collections.Specialized.NameValueCollection appSettings
    Exceptions
    Type Condition
    System.ArgumentNullException

    Fields

    ApiPath

    The local path to the ImageVault Api (Oauth)

    Declaration
    public const string ApiPath = "apiv2"
    Field Value
    Type Description
    System.String

    AppSettingsPrefix

    The prefix to use for ImageVault app settings

    Declaration
    public const string AppSettingsPrefix = "iv:"
    Field Value
    Type Description
    System.String

    CurrentUserApiPath

    The local path to the ImageVault api for authenticated users (same auth as web)

    Declaration
    public const string CurrentUserApiPath = "api"
    Field Value
    Type Description
    System.String

    Methods

    GetAppSetting(String)

    Gets the app settings value for the given key

    Declaration
    protected string GetAppSetting(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.String

    GetAppSettingAsBool(String, Boolean)

    Gets the app settings value as a boolean value

    Declaration
    protected bool GetAppSettingAsBool(string key, bool defaultValue = false)
    Parameters
    Type Name Description
    System.String key
    System.Boolean defaultValue
    Returns
    Type Description
    System.Boolean

    GetAppSettingAsInt(String, Int32)

    Get the app setting value as an int value

    Declaration
    protected int GetAppSettingAsInt(string key, int defaultValue = 0)
    Parameters
    Type Name Description
    System.String key
    System.Int32 defaultValue
    Returns
    Type Description
    System.Int32

    GetAppSettingAsLong(String, Int64)

    Gets the app settings value as a long value

    Declaration
    protected long GetAppSettingAsLong(string key, long defaultValue = 0L)
    Parameters
    Type Name Description
    System.String key
    System.Int64 defaultValue
    Returns
    Type Description
    System.Int64

    Extension Methods

    EnumExtensions.GetNames<TEnum>(TEnum)
    In This Article
    Back to top (c) Meriworks 2002-2022