diff --git a/Interfaces/IXAuthorizationCache.cs b/Interfaces/IXAuthorizationCache.cs deleted file mode 100644 index 83f3e51..0000000 --- a/Interfaces/IXAuthorizationCache.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Microsoft.AspNetCore.Authorization; - -namespace xIdentityModels.Interfaces -{ - public interface IXAuthorizationCache - { - void Clear(); - void RemovePolicy(string name); - void SetPolicy(string name, AuthorizationPolicy policy); - bool TryGetPolicy(string name, out AuthorizationPolicy policy); - } -} \ No newline at end of file diff --git a/Interfaces/IXPolicyProvider.cs b/Interfaces/IXPolicyProvider.cs deleted file mode 100644 index ab3eb51..0000000 --- a/Interfaces/IXPolicyProvider.cs +++ /dev/null @@ -1,247 +0,0 @@ -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; - -namespace xIdentityModels.Interfaces -{ - public interface IXPolicyProvider - { - // - #region Readers ... - /// - /// retrieve whole items as queryable ... - /// - /// a flag for Tracking behaviour - /// an Expression for Filter Items ... - /// an Order Builder expression for Ordering Query ... - /// - IQueryable AsQueryable( - bool asNoTracking = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null - ); - - /// - /// retrieve an Entity by it's Id ... - /// - /// - /// - /// - /// - Task GetAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// retrieve all exists Entities ... - /// - /// - /// - /// - /// - Task> GetAllAsync( - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// find an Entity by providing a Conditional Expression ... - /// - /// - /// - /// - /// - Task FindOneAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// find a collection of Entities by proving a Conditional Expression ... - /// - /// - /// - /// - /// - /// - Task> FindManyAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities ... - /// - /// - /// - /// - Task CountAsync( - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities Pages by providing page size ... - /// - /// - /// - /// - /// - /// - Task PagesCountAsync( - int pageSize, - int? totalItems = null, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// Check an Entity exists or not ... - /// - /// - /// - /// - /// - Task IsExistsAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Query ... - /// - /// retrieve Entities based on XQuery Pagination structure ... - /// - /// - /// - /// - /// - /// - /// - Task> QueryAsync( - XQuery query, - bool ignoreSoftDeleteds = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Add/Update/Remove ... - /// - /// add a new Entity ... - /// - /// - /// - /// - /// - /// - Task AddAsync( - XPolicyDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// Update an Entity values ... - /// - /// - /// - /// - /// - /// - /// - Task UpdateAsync( - int id, - XPolicyDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// remove an Entity by it's Id ... - /// - /// - /// - /// - /// - /// - /// - Task RemoveAsync( - int id, - bool softDelete = true, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Custom ... - #endregion - - // - #region Enrichers ... - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XPolicyDefinition source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XPolicyDefinitionDto source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - #endregion - } -} \ No newline at end of file diff --git a/Interfaces/IXRoleProvider.cs b/Interfaces/IXRoleProvider.cs deleted file mode 100644 index d226301..0000000 --- a/Interfaces/IXRoleProvider.cs +++ /dev/null @@ -1,247 +0,0 @@ -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; - -namespace xIdentityModels.Interfaces -{ - public interface IXRoleProvider - { - // - #region Readers ... - /// - /// retrieve whole items as queryable ... - /// - /// a flag for Tracking behaviour - /// an Expression for Filter Items ... - /// an Order Builder expression for Ordering Query ... - /// - IQueryable AsQueryable( - bool asNoTracking = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null - ); - - /// - /// retrieve an Entity by it's Id ... - /// - /// - /// - /// - /// - Task GetAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// retrieve all exists Entities ... - /// - /// - /// - /// - /// - Task> GetAllAsync( - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// find an Entity by providing a Conditional Expression ... - /// - /// - /// - /// - /// - Task FindOneAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// find a collection of Entities by proving a Conditional Expression ... - /// - /// - /// - /// - /// - /// - Task> FindManyAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities ... - /// - /// - /// - /// - Task CountAsync( - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities Pages by providing page size ... - /// - /// - /// - /// - /// - /// - Task PagesCountAsync( - int pageSize, - int? totalItems = null, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// Check an Entity exists or not ... - /// - /// - /// - /// - /// - Task IsExistsAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Query ... - /// - /// retrieve Entities based on XQuery Pagination structure ... - /// - /// - /// - /// - /// - /// - /// - Task> QueryAsync( - XQuery query, - bool ignoreSoftDeleteds = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Add/Update/Remove ... - /// - /// add a new Entity ... - /// - /// - /// - /// - /// - /// - Task AddAsync( - XRoleDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// Update an Entity values ... - /// - /// - /// - /// - /// - /// - /// - Task UpdateAsync( - int id, - XRoleDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// remove an Entity by it's Id ... - /// - /// - /// - /// - /// - /// - /// - Task RemoveAsync( - int id, - bool softDelete = true, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Custom ... - #endregion - - // - #region Enrichers ... - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XRoleDefinition source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XRoleDefinitionDto source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - #endregion - } -} \ No newline at end of file diff --git a/Interfaces/IXScopeProvider.cs b/Interfaces/IXScopeProvider.cs deleted file mode 100644 index 4bcd78a..0000000 --- a/Interfaces/IXScopeProvider.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using xModels.Dtos; -using System.Linq; -using System.Threading; -using xIdentityModels.Dtos; -using System.Threading.Tasks; -using xIdentityModels.Models; -using System.Linq.Expressions; -using System.Collections.Generic; - -namespace xIdentityModels.Interfaces -{ - public interface IXScopeProvider - { - // - #region Readers ... - /// - /// retrieve whole items as queryable ... - /// - /// a flag for Tracking behaviour - /// an Expression for Filter Items ... - /// an Order Builder expression for Ordering Query ... - /// - IQueryable AsQueryable( - bool asNoTracking = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null - ); - - /// - /// retrieve an Entity by it's Id ... - /// - /// - /// - /// - /// - Task GetAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// retrieve all exists Entities ... - /// - /// - /// - /// - /// - Task> GetAllAsync( - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// find an Entity by providing a Conditional Expression ... - /// - /// - /// - /// - /// - Task FindOneAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// find a collection of Entities by proving a Conditional Expression ... - /// - /// - /// - /// - /// - /// - Task> FindManyAsync( - Expression> predicate, - bool ignoreSoftDeleteds = true, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities ... - /// - /// - /// - /// - Task CountAsync( - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// count all exists Entities Pages by providing page size ... - /// - /// - /// - /// - /// - /// - Task PagesCountAsync( - int pageSize, - int? totalItems = null, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - - /// - /// Check an Entity exists or not ... - /// - /// - /// - /// - /// - Task IsExistsAsync( - int id, - bool ignoreSoftDeleteds = true, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Query ... - /// - /// retrieve Entities based on XQuery Pagination structure ... - /// - /// - /// - /// - /// - /// - /// - Task> QueryAsync( - XQuery query, - bool ignoreSoftDeleteds = true, - Expression> predicate = null, - Func, IOrderedQueryable> orderBuilder = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Add/Update/Remove ... - /// - /// add a new Entity ... - /// - /// - /// - /// - /// - /// - Task AddAsync( - XScopeDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// Update an Entity values ... - /// - /// - /// - /// - /// - /// - /// - Task UpdateAsync( - int id, - XScopeDefinitionDto item, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - - /// - /// remove an Entity by it's Id ... - /// - /// - /// - /// - /// - /// - /// - Task RemoveAsync( - int id, - bool softDelete = true, - bool saveChanges = true, - XUserClaimsInfoDto userInfo = null, - CancellationToken cancellationToken = default - ); - #endregion - - // - #region Custom ... - #endregion - - // - #region Enrichers ... - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XScopeDefinition source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich Item ... - /// - /// - /// - /// - Task EnrichAsync( - XScopeDefinitionDto source, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - - /// - /// Enrich a Collection of Items(s) ... - /// - /// - /// - /// - Task> EnrichRangeAsync( - IEnumerable sources, - CancellationToken cancellationToken = default - ); - #endregion - } -} \ No newline at end of file