diff --git a/Interfaces/IXBaseReferenced.cs b/Interfaces/IXBaseReferenced.cs new file mode 100644 index 0000000..0129904 --- /dev/null +++ b/Interfaces/IXBaseReferenced.cs @@ -0,0 +1,81 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using xIdentityModels.Models; + +namespace xIdentityService.Interfaces +{ + /// + /// a Referenced Service is a Service which can Referenced to other Items ... + /// + public interface IXBaseReferenced + { + /// + /// Get Reference Identifier for Specified Provider and Specified Item ... + /// + /// + /// + /// + string GetIdentifier( + string providedFor, + TKey forProvidedId + ); + + /// + /// Check Specified Item has Refernce to Provider ... + /// + /// + /// + /// + /// + /// + Task IsProvidedFor( + string providedFor, + TKey forProvidedId, + Guid id, + CancellationToken cancellationToken = default + ); + + /// + /// Add Specified Reference to Specified Item ... + /// + /// + /// + /// + /// + /// + /// + /// + /// + Task AddReference( + string providedFor, + TKey forProvidedId, + Guid id, + int forIndex = 0, + XUserClaimsInfoDto userInfo = null, + string connectionId = null, + CancellationToken cancellationToken = default + ); + + /// + /// Remove Specified Reference from Specified Item ... + /// + /// + /// + /// + /// + /// + /// + /// + /// + Task RemoveReference( + string providedFor, + TKey forProvidedId, + Guid id, + int forIndex = 0, + XUserClaimsInfoDto userInfo = null, + string connectionId = null, + CancellationToken cancellationToken = default + ); + } +} \ No newline at end of file