Refactor using XResourceProvider Feature of XString Service ...
This commit is contained in:
@@ -1,82 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xTermsAndConditionsService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// an Interface for Describing Terms and Conditions Management Controller Actions ...
|
||||
/// </summary>
|
||||
public interface IXTermsAndComditionsController
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieved all Exists Languages Terms and Conditions ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Terms/Languages")]
|
||||
Task<ActionResult<IEnumerable<string>>> TermsLanguages(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Check Has Terms and Conditions based on Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language">if null, used Default Language ...</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Terms/{language}/Has")]
|
||||
Task<ActionResult<bool>> HasTerms(
|
||||
[FromRoute] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Terms and Conditions for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language">if null, used Default Language ...</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Terms/{language}")]
|
||||
Task<ActionResult<string>> GetTerms(
|
||||
[FromRoute] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Terms and Conditions for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="terms"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Terms/{language}")]
|
||||
Task<ActionResult<string>> AddTerms(
|
||||
[FromRoute] string language,
|
||||
[FromBody] XBaseValueContainer<string> terms,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Terms and Conditions of Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("Terms/{language}")]
|
||||
Task<ActionResult<bool>> RemoveTerms(
|
||||
[FromRoute] string language,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update Terms and Conditions of Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="terms"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("Terms/{language}")]
|
||||
Task<ActionResult<bool>> UpdateTerms(
|
||||
[FromRoute] string language,
|
||||
[FromBody] XBaseValueContainer<string> terms,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xIdentityModels.Models;
|
||||
|
||||
namespace xTermsAndConditionsService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// an Interface for Describing Terms and Conditions Management Provided Actions ...
|
||||
/// </summary>
|
||||
public interface IXTermsAndComditionsProvider
|
||||
{
|
||||
#region Actions ...
|
||||
/// <summary>
|
||||
/// Retrieved all Exists Languages Terms and Conditions ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<string>> TermsLanguages(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Check Has Terms and Conditions based on Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language">if null, used Default Language ...</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> HasTerms(
|
||||
string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Terms and Conditions for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language">if null, used Default Language ...</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> GetTerms(
|
||||
string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Terms and Conditions for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="terms"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> AddTerms(
|
||||
string language,
|
||||
string terms,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Terms and Conditions of Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> RemoveTerms(
|
||||
string language,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update Terms and Conditions of Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="terms"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateTerms(
|
||||
string language,
|
||||
string terms,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xModels.Base;
|
||||
using xStringService.Interfaces;
|
||||
|
||||
namespace xTermsAndConditionsService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// an Interface for Describing Terms and Conditions Management Controller Actions ...
|
||||
/// </summary>
|
||||
public interface IXTermsAndConditionsController : IXBaseResourceProviderController
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xIdentityModels.Models;
|
||||
using xStringService.Interfaces;
|
||||
|
||||
namespace xTermsAndConditionsService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// an Interface for Describing Terms and Conditions Management Provided Actions ...
|
||||
/// </summary>
|
||||
public interface IXTermsAndConditionsProvider : IXResourceProvider
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user