• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API

    Show / Hide Table of Contents

    Interface IDataSourceConfiguration

    This helps a data source get configured. It manages all the properties which the data source will want to look up, as well as the LookUp engine which will perform the token resolution

    Namespace: ToSic.Eav.DataSources
    Assembly: ToSic.Eav.DataSources.dll
    Syntax
    [InternalApi_DoNotUse_MayChangeWithoutNotice]
    public interface IDataSourceConfiguration : IGetAccessors<string>

    Properties

    | Improve this Doc View Source

    IsParsed

    Tell us if the values have already been parsed or not. Ideal to check / avoid multiple calls to parse, which would just slow the system down.

    Declaration
    bool IsParsed { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Values

    The values (and keys) used in the data source which owns this Configuration

    Declaration
    IReadOnlyDictionary<string, string> Values { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>

    Methods

    | Improve this Doc View Source

    GetThis(String)

    Get a configuration value for a specific property. Just use GetThis() and the method name (which is the key) is added automatically by the compiler.

    Declaration
    string GetThis(string name = null)
    Parameters
    Type Name Description
    System.String name

    The configuration key. Do not set this; it's auto-added by the compiler.

    Returns
    Type Description
    System.String
    Remarks

    Added in v15.04

    | Improve this Doc View Source

    GetThis<T>(T, String)

    Get a configuration value for a specific property, or the fallback. Just use GetThis(5) and the method name (which is the key) is added automatically by the compiler.

    Declaration
    T GetThis<T>(T fallback, string name = null)
    Parameters
    Type Name Description
    T fallback

    Fallback value if the configuration is missing or can't be parsed into the expected data format.

    System.String name

    The configuration key. Do not set this; it's auto-added by the compiler.

    Returns
    Type Description
    T

    The configuration value or the fallback.

    Type Parameters
    Name Description
    T

    The data type of the result. Usually optional, because the fallback has this type so it's auto detected.

    Remarks

    Added in v15.04

    | Improve this Doc View Source

    Parse()

    Parse the values and change them so placeholders in the values are now the resolved value. This can only be called once - then the placeholder are gone. In scenarios where multiple parses are required, use the Parse(IDictionary) overload.

    Declaration
    void Parse()
    | Improve this Doc View Source

    Parse(IDictionary<String, String>)

    This will parse a dictionary of values and return the result. It's used to resolve the values list without actually changing the values on the configuration object, in scenarios where multiple parses will be required.

    Declaration
    IDictionary<string, string> Parse(IDictionary<string, string> values)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> values
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX