#203 adding IGanjoorTranslationService
This commit is contained in:
parent
789e519d30
commit
58734cfd91
@ -8351,6 +8351,61 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:RMuseum.Services.IGanjoorTranslationService">
|
||||
<summary>
|
||||
translation service implementation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.AddLanguageAsync(System.String,System.Boolean)">
|
||||
<summary>
|
||||
add language
|
||||
</summary>
|
||||
<param name="name"></param>
|
||||
<param name="rtl"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.UpdateLangaugeAsync(RMuseum.Models.Ganjoor.GanjoorLanguage)">
|
||||
<summary>
|
||||
update an existing language
|
||||
</summary>
|
||||
<param name="updated"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.DeleteLangaugeAsync(System.Int32)">
|
||||
<summary>
|
||||
حذف زبان
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.GetLanguageAsync(System.Int32)">
|
||||
<summary>
|
||||
get langauge by id
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.GetLanguagesAsync">
|
||||
<summary>
|
||||
get all languages
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.AddOrUpdatePoemTranslation(RMuseum.Models.Ganjoor.ViewModels.GanjoorPoemTranslationViewModel)">
|
||||
<summary>
|
||||
add or update poem translation
|
||||
</summary>
|
||||
<param name="translation"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorTranslationService.GetTranslationAsync(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
get translation
|
||||
</summary>
|
||||
<param name="langId"></param>
|
||||
<param name="poemId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:RMuseum.Services.Implementation.ArtifactService">
|
||||
<summary>
|
||||
IArtifactService implementation
|
||||
@ -9946,6 +10001,11 @@
|
||||
<param name="memoryCache"></param>
|
||||
<param name="httpClient"></param>
|
||||
</member>
|
||||
<member name="T:RMuseum.Services.Implementation.GanjoorTranslationService">
|
||||
<summary>
|
||||
translation service implementation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.GanjoorTranslationService.AddLanguageAsync(System.String,System.Boolean)">
|
||||
<summary>
|
||||
add language
|
||||
|
||||
66
RMuseum/Services/IGanjoorTranslationService.cs
Normal file
66
RMuseum/Services/IGanjoorTranslationService.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using RMuseum.Models.Ganjoor;
|
||||
using RMuseum.Models.Ganjoor.ViewModels;
|
||||
using RSecurityBackend.Models.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RMuseum.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// translation service implementation
|
||||
/// </summary>
|
||||
public interface IGanjoorTranslationService
|
||||
{
|
||||
/// <summary>
|
||||
/// add language
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="rtl"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<GanjoorLanguage>> AddLanguageAsync(string name, bool rtl);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// update an existing language
|
||||
/// </summary>
|
||||
/// <param name="updated"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<bool>> UpdateLangaugeAsync(GanjoorLanguage updated);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// حذف زبان
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<bool>> DeleteLangaugeAsync(int id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// get langauge by id
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<GanjoorLanguage>> GetLanguageAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// get all languages
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<GanjoorLanguage[]>> GetLanguagesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// add or update poem translation
|
||||
/// </summary>
|
||||
/// <param name="translation"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<bool>> AddOrUpdatePoemTranslation(GanjoorPoemTranslationViewModel translation);
|
||||
|
||||
/// <summary>
|
||||
/// get translation
|
||||
/// </summary>
|
||||
/// <param name="langId"></param>
|
||||
/// <param name="poemId"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<GanjoorPoemTranslationViewModel>> GetTranslationAsync(int langId, int poemId);
|
||||
}
|
||||
}
|
||||
@ -9,7 +9,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace RMuseum.Services.Implementation
|
||||
{
|
||||
public class GanjoorTranslationService
|
||||
/// <summary>
|
||||
/// translation service implementation
|
||||
/// </summary>
|
||||
public class GanjoorTranslationService : IGanjoorTranslationService
|
||||
{
|
||||
/// <summary>
|
||||
/// add language
|
||||
|
||||
@ -285,6 +285,9 @@ namespace RMuseum
|
||||
//donation service
|
||||
services.AddTransient<IDonationService, DonationService>();
|
||||
|
||||
//translation service
|
||||
services.AddTransient<IGanjoorTranslationService, GanjoorTranslationService>();
|
||||
|
||||
//upload limit for IIS
|
||||
services.Configure<IISServerOptions>(options =>
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user