last ...
This commit is contained in:
@@ -1,16 +1,19 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xDataService.Models;
|
using xDataService.Models;
|
||||||
using xIdentityModels.Models;
|
using xIdentityModels.Models;
|
||||||
|
using xModels.Base;
|
||||||
|
|
||||||
namespace xIdentityService.Interfaces
|
namespace xIdentityService.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// a Referenced Service is a Service which can Referenced to other Items ...
|
/// a Referenced Service is a Service which can Referenced to other Items ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IXBaseReferenced
|
public interface IXBaseReferenced<TEntity, TKey>
|
||||||
|
where TEntity : XBaseEntity<TKey>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Reference Identifier for Specified Provider and Specified Item ...
|
/// Get Reference Identifier for Specified Provider and Specified Item ...
|
||||||
@@ -18,9 +21,9 @@ namespace xIdentityService.Interfaces
|
|||||||
/// <param name="providedFor"></param>
|
/// <param name="providedFor"></param>
|
||||||
/// <param name="forProvidedId"></param>
|
/// <param name="forProvidedId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string GetIdentifier<TKey>(
|
string GetIdentifier<TReferenceKey>(
|
||||||
string providedFor,
|
string providedFor,
|
||||||
TKey forProvidedId
|
TReferenceKey forProvidedId
|
||||||
);
|
);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -31,10 +34,10 @@ namespace xIdentityService.Interfaces
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<bool> IsProvidedFor<TKey>(
|
Task<bool> IsProvidedFor<TReferenceKey>(
|
||||||
string providedFor,
|
string providedFor,
|
||||||
TKey forProvidedId,
|
TReferenceKey forProvidedId,
|
||||||
Guid id,
|
TKey id,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -49,10 +52,10 @@ namespace xIdentityService.Interfaces
|
|||||||
/// <param name="connectionId"></param>
|
/// <param name="connectionId"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task AddReference<TKey>(
|
Task AddReference<TReferenceKey>(
|
||||||
string providedFor,
|
string providedFor,
|
||||||
TKey forProvidedId,
|
TReferenceKey forProvidedId,
|
||||||
Guid id,
|
TKey id,
|
||||||
int forIndex = 0,
|
int forIndex = 0,
|
||||||
XUserClaimsInfoDto userInfo = null,
|
XUserClaimsInfoDto userInfo = null,
|
||||||
string connectionId = null,
|
string connectionId = null,
|
||||||
@@ -70,19 +73,28 @@ namespace xIdentityService.Interfaces
|
|||||||
/// <param name="connectionId"></param>
|
/// <param name="connectionId"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task RemoveReference<TKey>(
|
Task RemoveReference<TReferenceKey>(
|
||||||
string providedFor,
|
string providedFor,
|
||||||
TKey forProvidedId,
|
TReferenceKey forProvidedId,
|
||||||
Guid id,
|
TKey id,
|
||||||
int forIndex = 0,
|
int forIndex = 0,
|
||||||
XUserClaimsInfoDto userInfo = null,
|
XUserClaimsInfoDto userInfo = null,
|
||||||
string connectionId = null,
|
string connectionId = null,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Specified References ...
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="providedFor"></param>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <typeparam name="TReferenceKey"></typeparam>
|
||||||
|
/// <returns></returns>
|
||||||
Task<IEnumerable<XReference<string>>> GetReferences(
|
Task<IEnumerable<XReference<string>>> GetReferences(
|
||||||
Guid id,
|
string providedFor,
|
||||||
|
TKey id,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using xDataService.Models;
|
||||||
using xModels.Base;
|
using xModels.Base;
|
||||||
|
|
||||||
namespace xIdentityService.Interfaces
|
namespace xIdentityService.Interfaces
|
||||||
@@ -58,6 +60,20 @@ namespace xIdentityService.Interfaces
|
|||||||
[FromQuery] object forProvidedId,
|
[FromQuery] object forProvidedId,
|
||||||
[FromQuery] int forIndex = 0,
|
[FromQuery] int forIndex = 0,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieve References of Specified Itemfor providedFor ...
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="providedFor"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("{id}/References")]
|
||||||
|
Task<ActionResult<IEnumerable<XReference<string>>>> GetReferences(
|
||||||
|
[FromRoute] TKey id,
|
||||||
|
[FromQuery] string providedFor,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user