From 0e9680dc95b6a1bf1178f245a6089d2c1683df09 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Sun, 4 Oct 2026 22:02:13 +0330 Subject: [PATCH] last ... --- Interfaces/IXApplicationProvider.cs | 471 ++++++++++++++++++++++++++++ 1 file changed, 471 insertions(+) create mode 100644 Interfaces/IXApplicationProvider.cs diff --git a/Interfaces/IXApplicationProvider.cs b/Interfaces/IXApplicationProvider.cs new file mode 100644 index 0000000..dfc28c5 --- /dev/null +++ b/Interfaces/IXApplicationProvider.cs @@ -0,0 +1,471 @@ +using System; +using System.Linq; +using xModels.Dtos; +using System.Threading; +using xIdentityModels.Dtos; +using System.Threading.Tasks; +using xIdentityModels.Models; +using System.Linq.Expressions; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Query; + +namespace xIds.Interfaces +{ + /// + /// a Service For Manage Security Applications and also Api Key(s) ... + /// + public interface IXApplicationProvider + { + // + #region Application ... + /// + /// Add Specified Item ... + /// + /// + /// + /// + /// + Task AddApplicationAsync( + XApplicationDto item, + XUserClaimsInfoDto userInfo, + CancellationToken cancellationToken = default + ); + + /// + /// Update Specified Item ... + /// + /// + /// + /// + /// + /// + Task UpdateApplicationAsync( + int id, + XApplicationDto item, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Remove Specified Item ... + /// + /// + /// + /// + /// + /// + Task RemoveApplicationAsync( + int id, + bool softDelete = true, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve an Item by Providing it's ID ... + /// + /// + /// + /// + /// + /// + /// + Task GetApplicationAsync( + int id, + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items ... + /// + /// + /// + /// + /// + /// + /// + Task> GetAllApplicationAsync( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items as Async Enumerable ... + /// + /// + /// + /// + /// + /// + /// + IAsyncEnumerable GetAllApplicationAsAsyncEnumerable( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find an Item By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + Task FindOneApplicationAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find a Collection of Items By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + /// + Task> FindManyApplicationAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve Items based on XQuery Pagination Structure ... + /// + /// + /// + /// + /// + /// + /// + /// + Task> QueryApplicationAsync( + XQuery query, + bool ignoreSoftDeleteds = true, + Expression> predicate = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + #endregion + + // + #region ApiKey ... + /// + /// Add Specified Item ... + /// + /// + /// + /// + /// + Task AddApiKeyAsync( + XApiKey item, + XUserClaimsInfoDto userInfo, + CancellationToken cancellationToken = default + ); + + /// + /// Update Specified Item ... + /// + /// + /// + /// + /// + /// + Task UpdateApiKeyAsync( + int id, + XApiKeyDto item, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Remove Specified Item ... + /// + /// + /// + /// + /// + /// + Task RemoveApiKeyAsync( + int id, + bool softDelete = true, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve an Item by Providing it's ID ... + /// + /// + /// + /// + /// + /// + /// + Task GetApiKeyAsync( + int id, + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items ... + /// + /// + /// + /// + /// + /// + /// + Task> GetAllApiKeyAsync( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items as Async Enumerable ... + /// + /// + /// + /// + /// + /// + /// + IAsyncEnumerable GetAllApiKeyAsAsyncEnumerable( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find an Item By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + Task FindOneApiKeyAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find a Collection of Items By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + /// + Task> FindManyApiKeyAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve Items based on XQuery Pagination Structure ... + /// + /// + /// + /// + /// + /// + /// + /// + Task> QueryApiKeyAsync( + XQuery query, + bool ignoreSoftDeleteds = true, + Expression> predicate = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + #endregion + + // + #region ApiKeyUsage ... + /// + /// Add Specified Item ... + /// + /// + /// + /// + /// + Task AddApiKeyUsageAsync( + XApiKeyUsageDto item, + XUserClaimsInfoDto userInfo, + CancellationToken cancellationToken = default + ); + + /// + /// Update Specified Item ... + /// + /// + /// + /// + /// + /// + Task UpdateApiKeyUsageAsync( + int id, + XApiKeyUsageDto item, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Remove Specified Item ... + /// + /// + /// + /// + /// + /// + Task RemoveApiKeyUsageAsync( + int id, + bool softDelete = true, + XUserClaimsInfoDto userInfo = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve an Item by Providing it's ID ... + /// + /// + /// + /// + /// + /// + /// + Task GetApiKeyUsageAsync( + int id, + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items ... + /// + /// + /// + /// + /// + /// + /// + Task> GetAllApiKeyUsageAsync( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve all Items as Async Enumerable ... + /// + /// + /// + /// + /// + /// + /// + IAsyncEnumerable GetAllApiKeyUsageAsAsyncEnumerable( + bool ignoreSoftDeleteds = true, + XUserClaimsInfoDto userInfo = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find an Item By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + Task FindOneApiKeyUsageAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Find a Collection of Items By Providing a Conditional Expression ... + /// + /// + /// + /// + /// + /// + /// + Task> FindManyApiKeyUsageAsync( + Expression> predicate, + bool ignoreSoftDeleteds = true, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + + /// + /// Retrieve Items based on XQuery Pagination Structure ... + /// + /// + /// + /// + /// + /// + /// + /// + Task> QueryApiKeyUsageAsync( + XQuery query, + bool ignoreSoftDeleteds = true, + Expression> predicate = null, + Func, IOrderedQueryable> orderBuilder = null, + Func, IIncludableQueryable> includeBuilder = null, + CancellationToken cancellationToken = default + ); + #endregion + + // + #region Custom Actions ... + #endregion + + // + #region Enrichers ... + #endregion + } +} \ No newline at end of file