﻿#pragma warning disable CA1711

namespace Dike.Core.Localization
{
    using System.Collections.Generic;

    /// <summary>
    /// Extends the <see cref="Dictionaries.ILocalizationDictionary"/> interface to add tenant based localization.
    /// </summary>
    /// <seealso cref="Dike.Core.Localization.Dictionaries.ILocalizationDictionary" />
    public interface IMultiTenantLocalizationDictionary
        : Dictionaries.ILocalizationDictionary
    {
        #region Methods

        /// <summary>
        /// Gets all localized strings.
        /// </summary>
        /// <param name="tenantId">The tenant identifier. Can be <c>null</c> for the host.</param>
        /// <returns>A read-only list of localized strings.</returns>
        IReadOnlyList<LocalizedString> GetAllStrings(int? tenantId);

        /// <summary>
        /// Gets a localized string for a given name or <c>null</c> if not found.
        /// </summary>
        /// <param name="tenantId">The tenant identifier. Can be <c>null</c> for the host.</param>
        /// <param name="name">The unique name.</param>
        /// <returns>A localized string or <c>null</c> if not found.</returns>
        LocalizedString GetOrNull(int? tenantId, string name);

        #endregion Methods
    }
}

#pragma warning restore CA1711