95 lines
3.3 KiB
C#
95 lines
3.3 KiB
C#
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
|
|
}
|
|
} |