using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using xDataService.Models;
using xIdentityModels.Models;
using xModels.Base;
namespace xIdentityService.Interfaces
{
///
/// a Referenced Service is a Service which can Referenced to other Items ...
///
public interface IXBaseReferenced
where TEntity : XBaseEntity
{
///
/// Get Reference Identifier for Specified Provider and Specified Item ...
///
///
///
///
string GetIdentifier(
string providedFor,
TReferenceKey forProvidedId
);
///
/// Check Specified Item has Refernce to Provider ...
///
///
///
///
///
///
Task IsProvidedFor(
string providedFor,
TReferenceKey forProvidedId,
TKey id,
CancellationToken cancellationToken = default
);
///
/// Add Specified Reference to Specified Item ...
///
///
///
///
///
///
///
///
///
Task AddReference(
string providedFor,
TReferenceKey forProvidedId,
TKey id,
int forIndex = 0,
XUserClaimsInfoDto userInfo = null,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Remove Specified Reference from Specified Item ...
///
///
///
///
///
///
///
///
///
Task RemoveReference(
string providedFor,
TReferenceKey forProvidedId,
TKey id,
int forIndex = 0,
XUserClaimsInfoDto userInfo = null,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Get Specified References ...
///
///
///
///
///
///
Task>> GetReferences(
string providedFor,
TKey id,
CancellationToken cancellationToken = default
);
}
}