Compare commits
7
Commits
fe88855e69
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1711604941 | ||
|
|
9d48dd8146 | ||
|
|
38711f28a9 | ||
|
|
a0914b9519 | ||
|
|
d33b9f6fe1 | ||
|
|
e6920fd447 | ||
|
|
85fbc0899d |
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Constants;
|
using xStringService.Constants;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
namespace xStringService.Configurations.Entities
|
namespace xStringService.Configurations.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xCommons.Providers;
|
|
||||||
using xExceptions.Constants;
|
|
||||||
using xIdentityService.Controllers;
|
|
||||||
using xIdentityService.Interfaces;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using System.Threading;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xIdentityService.Controllers;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xCommons.Providers;
|
|
||||||
using xIdentityService.Controllers;
|
|
||||||
using xIdentityService.Interfaces;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using System.Threading;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xIdentityService.Controllers;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xCommons.Providers;
|
|
||||||
using xExceptions.Constants;
|
|
||||||
using xIdentityService.Interfaces;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using System.Threading;
|
||||||
|
using xCommons.Providers;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using xPushService.Controllers;
|
using xPushService.Controllers;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Providers;
|
using xCommons.Providers;
|
||||||
using xDataService.Controllers;
|
using xCommons.Configurations;
|
||||||
using xDataService.Interfaces;
|
using xDataService.Interfaces;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Controllers;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Providers;
|
using xCommons.Providers;
|
||||||
using xIdentityService.Interfaces;
|
using xCommons.Configurations;
|
||||||
using xPushService.Controllers;
|
|
||||||
using xPushService.Interfaces;
|
using xPushService.Interfaces;
|
||||||
using xStringService.Interfaces.Entities;
|
using xPushService.Controllers;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
using xStringService.Providers.Entities;
|
using xStringService.Providers.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Providers;
|
using xCommons.Providers;
|
||||||
using xDataService.Controllers;
|
using xCommons.Configurations;
|
||||||
using xDataService.Interfaces;
|
using xDataService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using xDataService.Controllers;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Providers;
|
using xCommons.Providers;
|
||||||
using xIdentityService.Interfaces;
|
using xCommons.Configurations;
|
||||||
using xPushService.Controllers;
|
|
||||||
using xPushService.Interfaces;
|
using xPushService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using xPushService.Controllers;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
|
|
||||||
namespace xStringService.Controllers
|
namespace xStringService.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
+14
-14
@@ -1,23 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using xExceptions.Constants;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xDataService.Constants;
|
|
||||||
using xDataService.Db;
|
using xDataService.Db;
|
||||||
using xDataService.DI;
|
using xDataService.DI;
|
||||||
using xDataService.Models;
|
|
||||||
using xStringService.Helpers;
|
|
||||||
using xCommons.Helpers;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using xStringService.Interfaces.Dtos;
|
|
||||||
using xStringService.Providers.Dtos;
|
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Providers.Entities;
|
|
||||||
using xPushService.Helpers;
|
|
||||||
using xPushService.DI;
|
using xPushService.DI;
|
||||||
using xStringService.Interfaces;
|
using xCommons.Helpers;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using xDataService.Models;
|
||||||
|
using xPushService.Helpers;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
using xDataService.Constants;
|
||||||
|
using xStringService.Helpers;
|
||||||
using xStringService.Providers;
|
using xStringService.Providers;
|
||||||
using xStringService.Constants;
|
using xStringService.Constants;
|
||||||
|
using xStringService.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
using xStringService.Providers.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace xStringService.DI
|
namespace xStringService.DI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using xCommons.Extensions;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
using GraphQL.Types;
|
using GraphQL.Types;
|
||||||
using xDataHelper.Providers.GraphQL;
|
|
||||||
using xDataService.Db;
|
using xDataService.Db;
|
||||||
using xDataService.Models;
|
using xDataService.Models;
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces;
|
using xDataHelper.Providers.GraphQL;
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
using xStringService.Providers.Entities;
|
|
||||||
using xStringService.Providers.GraphQL;
|
using xStringService.Providers.GraphQL;
|
||||||
|
using xStringService.Providers.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Helpers
|
namespace xStringService.Helpers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using xDataService.Interfaces;
|
using xDataService.Interfaces;
|
||||||
using xModels.Dtos;
|
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xCommons.Configurations;
|
using xCommons.Configurations;
|
||||||
using xModels.Dtos;
|
|
||||||
using xPushService.Interfaces;
|
using xPushService.Interfaces;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Interfaces.Dtos
|
namespace xStringService.Interfaces.Dtos
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using xModels.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
@@ -24,7 +24,7 @@ namespace xStringService.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve all Exists Items ...
|
/// Retrieve all Exists Items ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resource">Specified Resource Title</param>
|
/// <param name="identifier">Specified Resource Title</param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("ResourceLocales")]
|
[HttpGet("ResourceLocales")]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using xModels.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
@@ -22,7 +22,6 @@ namespace xStringService.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve all Exists Items ...
|
/// Retrieve all Exists Items ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resource">Specified Resource Title</param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("LocalesResource")]
|
[HttpGet("LocalesResource")]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xModels.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xModels.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xModels.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using xIdentityModels.Models;
|
using xIdentityModels.Models;
|
||||||
using xModels.Dtos;
|
|
||||||
using xPushService.Interfaces;
|
using xPushService.Interfaces;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using xModels.Dtos;
|
|
||||||
using xPushService.Interfaces;
|
using xPushService.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Interfaces
|
namespace xStringService.Interfaces
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using xModels.Base;
|
using xModels.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace xStringService.Models.Entities
|
namespace xStringService.Models.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xPushService.Base;
|
using xPushService.Base;
|
||||||
using xStringService.Interfaces.Dtos;
|
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Dtos
|
namespace xStringService.Providers.Dtos
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Dtos
|
namespace xStringService.Providers.Dtos
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
using xCommons.Configurations;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xDataService.Configuration;
|
|
||||||
using xExceptions.Constants;
|
|
||||||
using xIdentityService.Interfaces;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using System.Threading;
|
||||||
using xPushService.Base;
|
using xPushService.Base;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using xPushService.Constants;
|
using xPushService.Constants;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
using xCommons.Configurations;
|
||||||
using xStringService.Extensions;
|
using xStringService.Extensions;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xIdentityService.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.SignalR;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Dtos
|
namespace xStringService.Providers.Dtos
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.Db;
|
using xDataService.Db;
|
||||||
using xDataService.Interfaces;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Interfaces;
|
||||||
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using xPushService.Base;
|
using xPushService.Base;
|
||||||
using xStringService.Interfaces.Entities;
|
using Microsoft.Extensions.Logging;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Microsoft.AspNetCore.SignalR;
|
using xPushService.Base;
|
||||||
using xDataService.Configuration;
|
using xDataService.Configuration;
|
||||||
using xIdentityService.Interfaces;
|
using xIdentityService.Interfaces;
|
||||||
using xPushService.Base;
|
using Microsoft.AspNetCore.SignalR;
|
||||||
using xStringService.Interfaces.Entities;
|
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.Entities
|
namespace xStringService.Providers.Entities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.GraphQL;
|
using xDataService.GraphQL;
|
||||||
using xStringService.Constants;
|
using xStringService.Constants;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers.GraphQL
|
namespace xStringService.Providers.GraphQL
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using GraphQL.Types;
|
using GraphQL.Types;
|
||||||
using xDataService.Configuration;
|
|
||||||
using xDataService.GraphQL;
|
using xDataService.GraphQL;
|
||||||
using xStringService.Interfaces.Entities;
|
using xDataService.Configuration;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Interfaces.Entities;
|
||||||
|
|
||||||
namespace xDataHelper.Providers.GraphQL
|
namespace xDataHelper.Providers.GraphQL
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using xExceptions.Constants;
|
using xExceptions.Constants;
|
||||||
using xModels.Dtos;
|
using System.Threading.Tasks;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Providers
|
namespace xStringService.Providers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using xCommons.Extensions;
|
|
||||||
using xModels.Dtos;
|
using xModels.Dtos;
|
||||||
|
using System.Threading;
|
||||||
|
using xCommons.Extensions;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using xCommons.Configurations;
|
||||||
|
using xStringService.Extensions;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Providers
|
namespace xStringService.Providers
|
||||||
{
|
{
|
||||||
@@ -20,6 +23,11 @@ namespace xStringService.Providers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly string item;
|
private readonly string item;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application Configuration ...
|
||||||
|
/// </summary>
|
||||||
|
private readonly XAppConfiguration appConfig;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// String Provider Service ...
|
/// String Provider Service ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -30,11 +38,13 @@ namespace xStringService.Providers
|
|||||||
#region Constructor ...
|
#region Constructor ...
|
||||||
protected XBaseOwnedItemResourceProvider(
|
protected XBaseOwnedItemResourceProvider(
|
||||||
string item,
|
string item,
|
||||||
|
XAppConfiguration appConfig,
|
||||||
IXStringServiceProvider stringProvider
|
IXStringServiceProvider stringProvider
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
this.appConfig = appConfig;
|
||||||
this.stringProvider = stringProvider;
|
this.stringProvider = stringProvider;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -52,7 +62,19 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var items = await ExtractStrings(
|
||||||
|
owner: owner,
|
||||||
|
identifier: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
var result =
|
||||||
|
items
|
||||||
|
.Select(x => x.Language)
|
||||||
|
.Distinct();
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -66,7 +88,15 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var result = await ExtractStrings(
|
||||||
|
owner: owner,
|
||||||
|
identifier: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -82,7 +112,38 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var items = await ExtractStrings(
|
||||||
|
owner: owner,
|
||||||
|
identifier: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
foreach (var item in items)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Check Cancellation Token ...
|
||||||
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Try to Remove it ...
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//
|
||||||
|
await stringProvider.RemoveAsync(
|
||||||
|
id: item.Id,
|
||||||
|
softDelete: false,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -101,7 +162,24 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var resourceTitle = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var result = await stringProvider.FindManyAsync(
|
||||||
|
includeBuilder: null,
|
||||||
|
ignoreSoftDeleteds: true,
|
||||||
|
cancellationToken: cancellationToken,
|
||||||
|
predicate: x => x.ResourceTitle
|
||||||
|
.ToNormalString()
|
||||||
|
.Contains(resourceTitle.ToNormalString())
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -117,7 +195,16 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var result = (await GetResourceLocales(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
))
|
||||||
|
.Select(x => x.ToXLocaleResourceDto());
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -134,7 +221,26 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var resource = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
var locales = await GetLocales(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var result = new XResourceDto
|
||||||
|
{
|
||||||
|
Locales = locales,
|
||||||
|
Resource = resource
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -154,7 +260,30 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var resource = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var resourceDto = await stringProvider.AddOrUpdateByLocaleResource(
|
||||||
|
item: locale,
|
||||||
|
resource: resource,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Retrieve XResourceDto ...
|
||||||
|
var result = await GetResource(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -174,7 +303,70 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var resourceTitle = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var isValid =
|
||||||
|
!resource.IsNullOrDefault() &&
|
||||||
|
resource.Resource == resourceTitle;
|
||||||
|
if (!isValid)
|
||||||
|
{
|
||||||
|
XException.InvalidArgs.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Retrieve Exists Resource ...
|
||||||
|
var result = await GetResource(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
isValid =
|
||||||
|
!result.IsNullOrDefault() &&
|
||||||
|
result.Locales.HasChild();
|
||||||
|
if (isValid)
|
||||||
|
{
|
||||||
|
await RemoveLocales(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
foreach (var locale in resource.Locales)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
var item = new XStringDto
|
||||||
|
{
|
||||||
|
Language = locale.Language,
|
||||||
|
ResourceTitle = resourceTitle,
|
||||||
|
TranslatedValue = locale.Value,
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
await stringProvider.AddAsync(
|
||||||
|
item: item,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = await GetResource(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -194,7 +386,72 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
XResourceDto result = null;
|
||||||
|
language = NormalizedLanguage(language);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Locale Exists ...
|
||||||
|
var isValid = await HasLocale(
|
||||||
|
owner: owner,
|
||||||
|
language: language,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
if (!isValid)
|
||||||
|
{
|
||||||
|
XException.NotFound.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
var resourceTitle = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var item = await stringProvider.FindOneAsync(
|
||||||
|
includeBuilder: null,
|
||||||
|
ignoreSoftDeleteds: true,
|
||||||
|
cancellationToken: cancellationToken,
|
||||||
|
predicate: x =>
|
||||||
|
x.Language.Equals(
|
||||||
|
language,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase) &&
|
||||||
|
x.ResourceTitle.Equals(
|
||||||
|
resourceTitle,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase)
|
||||||
|
);
|
||||||
|
isValid = !item.IsNullOrDefault();
|
||||||
|
if (!isValid)
|
||||||
|
{
|
||||||
|
XException.NotFound.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Remove XStringDto ...
|
||||||
|
await stringProvider.RemoveAsync(
|
||||||
|
id: item.Id,
|
||||||
|
softDelete: false,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//
|
||||||
|
result = await GetResource(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -212,7 +469,34 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var resourceTitle = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var items = await stringProvider.FindManyAsync(
|
||||||
|
includeBuilder: null,
|
||||||
|
ignoreSoftDeleteds: true,
|
||||||
|
cancellationToken: cancellationToken,
|
||||||
|
predicate: x =>
|
||||||
|
x.ResourceTitle.Equals(
|
||||||
|
resourceTitle,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase)
|
||||||
|
);
|
||||||
|
var isValid = !item.IsNull();
|
||||||
|
if (!isValid)
|
||||||
|
{
|
||||||
|
XException.NotFound.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
await stringProvider.RemoveResource(
|
||||||
|
resource: resourceTitle,
|
||||||
|
connectionId: connectionId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -230,7 +514,22 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
language = NormalizedLanguage(language);
|
||||||
|
var locales = await GetLocales(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
var result =
|
||||||
|
language.HasChild() &&
|
||||||
|
locales.Any(l => l.Language.Equals(
|
||||||
|
language,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase)
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -246,7 +545,19 @@ namespace xStringService.Providers
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
//
|
||||||
|
var items = await ExtractStrings(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
var result =
|
||||||
|
items
|
||||||
|
.Select(x => x.Language)
|
||||||
|
.Distinct();
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -298,6 +609,30 @@ namespace xStringService.Providers
|
|||||||
|
|
||||||
//
|
//
|
||||||
#region Private ...
|
#region Private ...
|
||||||
|
private string NormalizedLanguage(
|
||||||
|
string language = null
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
var result = language;
|
||||||
|
if (result.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = GetDefaultLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetDefaultLanguage()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
var result = appConfig.DefaultLanguage;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private async Task<IEnumerable<XStringDto>> ExtractStrings(
|
private async Task<IEnumerable<XStringDto>> ExtractStrings(
|
||||||
string resourceTitle,
|
string resourceTitle,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
@@ -317,10 +652,32 @@ namespace xStringService.Providers
|
|||||||
includeBuilder: null,
|
includeBuilder: null,
|
||||||
ignoreSoftDeleteds: true,
|
ignoreSoftDeleteds: true,
|
||||||
cancellationToken: cancellationToken,
|
cancellationToken: cancellationToken,
|
||||||
|
orderBuilder: x => x.OrderBy(y => y.Id),
|
||||||
predicate: x => x.ResourceTitle
|
predicate: x => x.ResourceTitle
|
||||||
.ToNormalString()
|
.ToNormalString()
|
||||||
.Contains(resourceTitle),
|
.Contains(resourceTitle.ToNormalString())
|
||||||
orderBuilder: x => x.OrderBy(y => y.Id)
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<IEnumerable<XStringDto>> ExtractStrings(
|
||||||
|
object owner,
|
||||||
|
object identifier,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
var resourceTitle = GetResourceTitle(
|
||||||
|
owner: owner,
|
||||||
|
identifier: identifier
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var result = await ExtractStrings(
|
||||||
|
resourceTitle: resourceTitle,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using xExceptions.Constants;
|
using xExceptions.Constants;
|
||||||
using xModels.Dtos;
|
using System.Threading.Tasks;
|
||||||
using xStringService.Extensions;
|
using xStringService.Extensions;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
|
||||||
namespace xStringService.Providers
|
namespace xStringService.Providers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using xDataService.Interfaces;
|
|
||||||
using xDataService.Providers;
|
using xDataService.Providers;
|
||||||
using xStringService.Configurations.Entities;
|
using xDataService.Interfaces;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using xStringService.Models.Entities;
|
using xStringService.Models.Entities;
|
||||||
|
using xStringService.Configurations.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers
|
namespace xStringService.Providers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using xModels.Dtos;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using xExceptions.Constants;
|
using xExceptions.Constants;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using xIdentityModels.Models;
|
using xIdentityModels.Models;
|
||||||
using xModels.Dtos;
|
|
||||||
using xPushService.Providers;
|
using xPushService.Providers;
|
||||||
using xStringService.Extensions;
|
using xStringService.Extensions;
|
||||||
using xStringService.Interfaces;
|
using xStringService.Interfaces;
|
||||||
using xStringService.Interfaces.Dtos;
|
using System.Collections.Generic;
|
||||||
using xStringService.Models.Dtos;
|
using xStringService.Models.Dtos;
|
||||||
using xStringService.Models.Entities;
|
|
||||||
using xStringService.Providers.Dtos;
|
using xStringService.Providers.Dtos;
|
||||||
|
using xStringService.Interfaces.Dtos;
|
||||||
|
using xStringService.Models.Entities;
|
||||||
|
|
||||||
namespace xStringService.Providers
|
namespace xStringService.Providers
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -3,6 +3,6 @@
|
|||||||
<packageSources>
|
<packageSources>
|
||||||
<!-- <add key="megan" value="https://hub.megan.ir/nuget/index.json" /> -->
|
<!-- <add key="megan" value="https://hub.megan.ir/nuget/index.json" /> -->
|
||||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
<add key="baget" value="https://nuget.saherelmhub.ir/v3/index.json" protocolVersion="3" disableTLSCertificateValidation="true" />
|
<!-- <add key="baget" value="https://nuget.saherelmhub.ir/v3/index.json" protocolVersion="3" disableTLSCertificateValidation="true" /> -->
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<!-- Icon Handling -->
|
<!-- Icon Handling -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true"
|
<None Include="../../Documents/Resources/Images/favicon.png" Link="icon.png" Pack="true"
|
||||||
PackagePath="\icon.png" />
|
PackagePath="\icon.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -34,9 +34,9 @@
|
|||||||
|
|
||||||
<!-- For XML Documentation Support -->
|
<!-- For XML Documentation Support -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user