add Support for Getting Calculated Resource Title for Specified Resource Item ...
172 lines
5.7 KiB
C#
172 lines
5.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using xModels.Dtos;
|
|
using xStringService.Models.Dtos;
|
|
|
|
namespace xStringService.Interfaces
|
|
{
|
|
public interface IXItemResourceProvider
|
|
{
|
|
//
|
|
#region Group Actions ...
|
|
/// <summary>
|
|
/// Retrieve a List of Exists Languages for Current Item ...
|
|
/// </summary>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<string>> GetLanguages(
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Retrieve all Exists Items of type ...
|
|
/// </summary>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<XStringDto>> GetResourceLocales(
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Remove all Exists Locales which Related to this Provider ...
|
|
/// </summary>
|
|
/// <param name="connectionId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task RemoveResourceLocales(
|
|
string connectionId = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
#endregion
|
|
|
|
//
|
|
#region Item Actions ...
|
|
/// <summary>
|
|
/// Get all Exists Items for Specified identitifer ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<XStringDto>> GetResourceLocales(
|
|
object identifier,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Get all Exists Items for Specified identitifer ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<XLocaleResourceDto>> GetLocales(
|
|
object identifier,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Get all Exists Locales Representaion based on Specified Identitifer
|
|
/// as XResourceDto ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XResourceDto> GetResource(
|
|
object identifier,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Add Or Update Locale for Specified Identitifer ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="locale"></param>
|
|
/// <param name="connectionId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XResourceDto> AddOrUpdateLocale(
|
|
object identifier,
|
|
XLocaleResourceDto locale,
|
|
string connectionId = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Update a Resource State ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="resource"></param>
|
|
/// <param name="connectionId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XResourceDto> AddOrUpdateResource(
|
|
object identifier,
|
|
XResourceDto resource,
|
|
string connectionId = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Remove Specified Language Locale of Specified Identifier ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="language"></param>
|
|
/// <param name="connectionId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XResourceDto> RemoveLocale(
|
|
object identifier,
|
|
string language,
|
|
string connectionId = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Remove all Exists Locales for Specified Identifier ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="connectionId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task RemoveLocales(
|
|
object identifier,
|
|
string connectionId = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Check Specified ocale Exists for Specified Identifier ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="language"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<bool> HasLocale(
|
|
object identifier,
|
|
string language,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Get all Exists Languages for Specified Identifier ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<string>> GetLanguages(
|
|
object identifier,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
#endregion
|
|
|
|
//
|
|
#region Resource Title Action ...
|
|
/// <summary>
|
|
/// Retrieve Resource Title ...
|
|
/// </summary>
|
|
/// <param name="identifier"></param>
|
|
/// <returns></returns>
|
|
string GetResourceTitle(object identifier = null);
|
|
#endregion
|
|
}
|
|
} |