Search Results for

    Show / Hide Table of Contents

    Class Configuration

    Represents a set of configuration settings

    Inheritance
    object
    Configuration
    GlobalConfiguration
    Implements
    IReadableConfiguration
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: mailslurp.Client
    Assembly: mailslurp.dll
    Syntax
    public class Configuration : IReadableConfiguration

    Constructors

    View Source

    Configuration()

    Initializes a new instance of the Configuration class

    Declaration
    public Configuration()
    View Source

    Configuration(IDictionary<string, string>, IDictionary<string, string>, IDictionary<string, string>, string)

    Initializes a new instance of the Configuration class

    Declaration
    public Configuration(IDictionary<string, string> defaultHeaders, IDictionary<string, string> apiKey, IDictionary<string, string> apiKeyPrefix, string basePath = "https://csharp.api.mailslurp.com")
    Parameters
    Type Name Description
    IDictionary<string, string> defaultHeaders
    IDictionary<string, string> apiKey
    IDictionary<string, string> apiKeyPrefix
    string basePath

    Fields

    View Source

    DefaultExceptionFactory

    Default creation of exceptions for a given method name and response object

    Declaration
    public static readonly ExceptionFactory DefaultExceptionFactory
    Field Value
    Type Description
    ExceptionFactory
    View Source

    ISO8601_DATETIME_FORMAT

    Identifier for ISO 8601 DateTime Format

    Declaration
    public const string ISO8601_DATETIME_FORMAT = "o"
    Field Value
    Type Description
    string
    Remarks

    See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information.

    View Source

    Version

    Version of the package.

    Declaration
    public const string Version = "15.19.22"
    Field Value
    Type Description
    string

    Version of the package.

    Properties

    View Source

    AccessToken

    Gets or sets the access token for OAuth2 authentication.

    This helper property simplifies code generation.

    Declaration
    public virtual string AccessToken { get; set; }
    Property Value
    Type Description
    string

    The access token.

    View Source

    ApiKey

    Gets or sets the API key based on the authentication name.

    Declaration
    public virtual IDictionary<string, string> ApiKey { get; set; }
    Property Value
    Type Description
    IDictionary<string, string>

    The API key.

    View Source

    ApiKeyPrefix

    Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.

    Whatever you set here will be prepended to the value defined in AddApiKey.

    An example invocation here might be: ApiKeyPrefix["Authorization"] = "Bearer"; … where ApiKey["Authorization"] would then be used to set the value of your bearer token.

    OAuth2 workflows should set tokens via AccessToken.
    Declaration
    public virtual IDictionary<string, string> ApiKeyPrefix { get; set; }
    Property Value
    Type Description
    IDictionary<string, string>

    The prefix of the API key.

    View Source

    BasePath

    Gets or sets the base path for API access.

    Declaration
    public virtual string BasePath { get; set; }
    Property Value
    Type Description
    string
    View Source

    ClientCertificates

    Gets or sets certificate collection to be sent with requests.

    Declaration
    public X509CertificateCollection ClientCertificates { get; set; }
    Property Value
    Type Description
    X509CertificateCollection

    X509 Certificate collection.

    View Source

    DateTimeFormat

    Gets or sets the date time format used when serializing in the ApiClient By default, it's set to ISO 8601 - "o", for others see: https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx No validation is done to ensure that the string you're providing is valid

    Declaration
    public virtual string DateTimeFormat { get; set; }
    Property Value
    Type Description
    string

    The DateTimeFormat string

    View Source

    DefaultHeader

    Gets or sets the default header.

    Declaration
    [Obsolete("Use DefaultHeaders instead.")]
    public virtual IDictionary<string, string> DefaultHeader { get; set; }
    Property Value
    Type Description
    IDictionary<string, string>
    View Source

    DefaultHeaders

    Gets or sets the default headers.

    Declaration
    public virtual IDictionary<string, string> DefaultHeaders { get; set; }
    Property Value
    Type Description
    IDictionary<string, string>
    View Source

    OperationServers

    Gets or sets the operation servers.

    Declaration
    public virtual IReadOnlyDictionary<string, List<IReadOnlyDictionary<string, object>>> OperationServers { get; set; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, System.Collections.Generic.List<T><IReadOnlyDictionary<string, object>>>

    The operation servers.

    View Source

    Password

    Gets or sets the password (HTTP basic authentication).

    Declaration
    public virtual string Password { get; set; }
    Property Value
    Type Description
    string

    The password.

    View Source

    Proxy

    Gets or sets the proxy

    Declaration
    public virtual WebProxy Proxy { get; set; }
    Property Value
    Type Description
    System.Net.WebProxy

    Proxy.

    View Source

    Servers

    Gets or sets the servers.

    Declaration
    public virtual IList<IReadOnlyDictionary<string, object>> Servers { get; set; }
    Property Value
    Type Description
    IList<IReadOnlyDictionary<string, object>>

    The servers.

    View Source

    TempFolderPath

    Gets or sets the temporary folder path to store the files downloaded from the server.

    Declaration
    public virtual string TempFolderPath { get; set; }
    Property Value
    Type Description
    string

    Folder path.

    View Source

    Timeout

    Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.

    Declaration
    public virtual int Timeout { get; set; }
    Property Value
    Type Description
    int
    View Source

    UserAgent

    Gets or sets the HTTP user agent.

    Declaration
    public virtual string UserAgent { get; set; }
    Property Value
    Type Description
    string

    Http user agent.

    View Source

    Username

    Gets or sets the username (HTTP basic authentication).

    Declaration
    public virtual string Username { get; set; }
    Property Value
    Type Description
    string

    The username.

    Methods

    View Source

    AddApiKey(string, string)

    Add Api Key Header.

    Declaration
    public void AddApiKey(string key, string value)
    Parameters
    Type Name Description
    string key

    Api Key name.

    string value

    Api Key value.

    View Source

    AddApiKeyPrefix(string, string)

    Sets the API key prefix.

    Declaration
    public void AddApiKeyPrefix(string key, string value)
    Parameters
    Type Name Description
    string key

    Api Key name.

    string value

    Api Key value.

    View Source

    GetApiKeyWithPrefix(string)

    Gets the API key with prefix.

    Declaration
    public string GetApiKeyWithPrefix(string apiKeyIdentifier)
    Parameters
    Type Name Description
    string apiKeyIdentifier

    API key identifier (authentication scheme).

    Returns
    Type Description
    string

    API key with prefix.

    View Source

    GetOperationServerUrl(string, int, Dictionary<string, string>)

    Returns URL based on operation server settings.

    Declaration
    public string GetOperationServerUrl(string operation, int index, Dictionary<string, string> inputVariables)
    Parameters
    Type Name Description
    string operation

    Operation associated with the request path.

    int index

    Array index of the server settings.

    Dictionary<string, string> inputVariables

    Dictionary of the variables and the corresponding values.

    Returns
    Type Description
    string
    View Source

    GetOperationServerUrl(string, int)

    Returns URL based on operation server settings.

    Declaration
    public string GetOperationServerUrl(string operation, int index)
    Parameters
    Type Name Description
    string operation

    Operation associated with the request path.

    int index

    Array index of the server settings.

    Returns
    Type Description
    string
    View Source

    GetServerUrl(int, Dictionary<string, string>)

    Returns URL based on server settings.

    Declaration
    public string GetServerUrl(int index, Dictionary<string, string> inputVariables)
    Parameters
    Type Name Description
    int index

    Array index of the server settings.

    Dictionary<string, string> inputVariables

    Dictionary of the variables and the corresponding values.

    Returns
    Type Description
    string
    View Source

    GetServerUrl(int)

    Returns URL based on server settings without providing values for the variables

    Declaration
    public string GetServerUrl(int index)
    Parameters
    Type Name Description
    int index

    Array index of the server settings.

    Returns
    Type Description
    string
    View Source

    MergeConfigurations(IReadableConfiguration, IReadableConfiguration)

    Merge configurations.

    Declaration
    public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second)
    Parameters
    Type Name Description
    IReadableConfiguration first

    First configuration.

    IReadableConfiguration second

    Second configuration.

    Returns
    Type Description
    IReadableConfiguration
    View Source

    ToDebugReport()

    Returns a string with essential information for debugging.

    Declaration
    public static string ToDebugReport()
    Returns
    Type Description
    string

    Implements

    IReadableConfiguration
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.