diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 3d771e204..000000000 --- a/.drone.yml +++ /dev/null @@ -1,224 +0,0 @@ ---- -kind: pipeline -name: default - -steps: - - name: build_dev - image: docker - commands: - - docker build -t squidex --build-arg SQUIDEX__VERSION=4.0.0-dev-$${DRONE_BUILD_NUMBER} . - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - event: - - push - - pull_request - branch: - - master - - release/* - - - name: build_release - image: docker - commands: - - docker build -t squidex --build-arg SQUIDEX__VERSION=$${DRONE_TAG} . - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - event: - - tag - - - name: test_start - image: docker/compose - commands: - - cd backend/tests - - docker-compose up -d - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - event: - - tag - - push - - pull_request - branch: - - master - - release/* - - - name: test_run - image: mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim - environment: - CONFIG__SERVER__URL: http://localhost:8080 - CONFIG__WAIT: 60 - commands: - - dotnet test backend/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated - network_mode: host - when: - event: - - tag - - push - - pull_request - branch: - - master - - release/* - - - name: test_cleanup - image: docker/compose - commands: - - cd backend/tests - - docker-compose down - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - status: - - failure - - success - event: - - tag - - push - - pull_request - branch: - - master - - release/* - - - name: push_dev - image: docker - commands: - - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - - docker tag squidex squidex/squidex:dev - - docker tag squidex squidex/squidex:dev-$${DRONE_BUILD_NUMBER} - - docker push squidex/squidex:dev - - docker push squidex/squidex:dev-$${DRONE_BUILD_NUMBER} - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - environment: - DOCKER_USERNAME: - from_secret: DOCKER_USERNAME - DOCKER_PASSWORD: - from_secret: DOCKER_PASSWORD - when: - event: - - push - branch: - - master - - release/* - - - name: push_release - image: docker - commands: - - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - - docker tag squidex squidex/squidex:latest - - docker tag squidex squidex/squidex:$${DRONE_TAG} - - docker tag squidex squidex/squidex:$${DRONE_TAG:0:1} - - docker push squidex/squidex:latest - - docker push squidex/squidex:$${DRONE_TAG} - - docker push squidex/squidex:$${DRONE_TAG:0:1} - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - environment: - DOCKER_USERNAME: - from_secret: DOCKER_USERNAME - DOCKER_PASSWORD: - from_secret: DOCKER_PASSWORD - when: - event: - - tag - - - name: build_binaries - image: docker - commands: - - docker create --name squidex-container squidex - - docker cp squidex-container:/app/. /build - volumes: - - name: build - path: /build - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - event: - - tag - - - name: binaries_zip - image: kramos/alpine-zip - commands: - - cd /build && zip -r /release/binaries.zip . - volumes: - - name: build - path: /build - - name: release - path: /release - when: - event: - - tag - - - name: binaries_publish - image: plugins/github-release - settings: - api_key: - from_secret: GITHUB_TOKEN - files: - - /release/binaries.zip - volumes: - - name: release - path: /release - when: - event: - - tag - - - name: binaries_cleanup - image: docker - commands: - - docker rm squidex-container - volumes: - - name: docker1 - path: /var/run/docker.sock - - name: docker2 - path: /var/lib/docker - when: - status: - - failure - - success - event: - - tag - -volumes: - - name: build - temp: {} - - name: release - temp: {} - - name: docker1 - host: - path: /var/run/docker.sock - - name: docker2 - host: - path: /var/lib/docker ---- -kind: secret -name: GITHUB_TOKEN -data: ug4jjv04VM8v6+j18pGC/xVcnhB55AQI+F6Raz3mmZ7JRWYwDcu7x1PryHhkFBErtGrQHMHvr5EhAqwMaun7WurKUnI= ---- -kind: secret -name: DOCKER_USERNAME -data: BRJUSatZx7X0MCxVq1QboS2DBeye7jnPoeuDi7ejkPDq8EDrrCVT9D2DuQ== ---- -kind: secret -name: DOCKER_PASSWORD -data: 2JITndCjHwdCyJ/m/onZNnUlXxIJ5FhECC+gnY3klV9PIQYIyLwQ diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c52025c4b..1bcd1e280 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -102,7 +102,7 @@ jobs: - name: RUN TEST uses: kohlerdominik/docker-run-action@v1.0.0 with: - image: mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim + image: mcr.microsoft.com/dotnet/sdk:6.0 environment: | CONFIG__WAIT=60 CONFIG__SERVER__URL=http://localhost:8080 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 573b0e016..48746cda2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,7 +85,7 @@ jobs: - name: RUN TEST uses: kohlerdominik/docker-run-action@v1.0.0 with: - image: mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim + image: mcr.microsoft.com/dotnet/sdk:6.0 environment: | CONFIG__WAIT=60 CONFIG__SERVER__URL=http://localhost:8080 diff --git a/Dockerfile b/Dockerfile index 25d25c73d..cd3c72ccd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # # Stage 1, Build Backend # -FROM mcr.microsoft.com/dotnet/sdk:5.0 as backend +FROM mcr.microsoft.com/dotnet/sdk:6.0 as backend ARG SQUIDEX__VERSION=5.0.0 @@ -64,7 +64,7 @@ RUN cp -a build /build/ # # Stage 3, Build runtime # -FROM mcr.microsoft.com/dotnet/aspnet:5.0.0-buster-slim +FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-bullseye-slim # Curl for debugging and libc-dev for Protobuf RUN apt-get update \ diff --git a/backend/extensions/Squidex.Extensions/APM/Otlp/OtlpPlugin.cs b/backend/extensions/Squidex.Extensions/APM/Otlp/OtlpPlugin.cs index 3f0ac304b..451af7430 100644 --- a/backend/extensions/Squidex.Extensions/APM/Otlp/OtlpPlugin.cs +++ b/backend/extensions/Squidex.Extensions/APM/Otlp/OtlpPlugin.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Trace; diff --git a/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverExceptionHandler.cs b/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverExceptionHandler.cs index bda1fe1eb..8bd8ff1b5 100644 --- a/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverExceptionHandler.cs +++ b/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverExceptionHandler.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Google.Cloud.Diagnostics.Common; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; diff --git a/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverSeverityLogAppender.cs b/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverSeverityLogAppender.cs index b12567eca..f94de0da8 100644 --- a/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverSeverityLogAppender.cs +++ b/backend/extensions/Squidex.Extensions/APM/Stackdriver/StackdriverSeverityLogAppender.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Log; namespace Squidex.Extensions.APM.Stackdriver diff --git a/backend/extensions/Squidex.Extensions/Actions/Algolia/AlgoliaActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Algolia/AlgoliaActionHandler.cs index 7dca8ea31..016d9987f 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Algolia/AlgoliaActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Algolia/AlgoliaActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Algolia.Search.Clients; using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueAction.cs b/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueAction.cs index a6e4f3b13..fad817de3 100644 --- a/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueActionHandler.cs index 9f6cf1586..23fd6bf69 100644 --- a/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/AzureQueue/AzureQueueActionHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/extensions/Squidex.Extensions/Actions/ClientPool.cs b/backend/extensions/Squidex.Extensions/Actions/ClientPool.cs index b65ad0fe9..a3d56f674 100644 --- a/backend/extensions/Squidex.Extensions/Actions/ClientPool.cs +++ b/backend/extensions/Squidex.Extensions/Actions/ClientPool.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; diff --git a/backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs index d2c522eb1..e8374aff5 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Entities.Comments.Commands; diff --git a/backend/extensions/Squidex.Extensions/Actions/CreateContent/CreateContentActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/CreateContent/CreateContentActionHandler.cs index 6c83957b6..82790f3ac 100644 --- a/backend/extensions/Squidex.Extensions/Actions/CreateContent/CreateContentActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/CreateContent/CreateContentActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseAction.cs b/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseAction.cs index 28ef2ac0f..6db4a90f2 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseActionHandler.cs index 90bca6540..35e0ccea9 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Discourse/DiscourseActionHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Net.Http; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchAction.cs b/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchAction.cs index d576c842a..800df9238 100644 --- a/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchActionHandler.cs index f7606719f..51bbe6175 100644 --- a/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/ElasticSearch/ElasticSearchActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Elasticsearch.Net; using Newtonsoft.Json.Linq; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/extensions/Squidex.Extensions/Actions/Email/EmailActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Email/EmailActionHandler.cs index c8cf69b09..6ea960591 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Email/EmailActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Email/EmailActionHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MailKit.Net.Smtp; using MimeKit; using MimeKit.Text; diff --git a/backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs index c779006d5..d2a98cf3d 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Infrastructure; diff --git a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaActionHandler.cs index ba197ef69..635ded180 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaActionHandler.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; @@ -78,7 +74,7 @@ namespace Squidex.Extensions.Actions.Kafka if (indexEqual > 0 && indexEqual < line.Length - 1) { - var key = line.Substring(0, indexEqual); + var key = line[..indexEqual]; var val = line[(indexEqual + 1)..]; val = await FormatAsync(val, @event); diff --git a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs index b91407032..f7cf430de 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Avro; using Avro.Generic; using Confluent.Kafka; diff --git a/backend/extensions/Squidex.Extensions/Actions/Medium/MediumActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Medium/MediumActionHandler.cs index 037865455..4ee971249 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Medium/MediumActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Medium/MediumActionHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Net.Http; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Infrastructure.Http; diff --git a/backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs index 3f8bf7f39..7aed0abc8 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Entities.Comments.Commands; diff --git a/backend/extensions/Squidex.Extensions/Actions/Prerender/PrerenderActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Prerender/PrerenderActionHandler.cs index fef0970b8..a5eaf0425 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Prerender/PrerenderActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Prerender/PrerenderActionHandler.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Net.Http; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/extensions/Squidex.Extensions/Actions/RuleHelper.cs b/backend/extensions/Squidex.Extensions/Actions/RuleHelper.cs index 139c8b185..920dfe93a 100644 --- a/backend/extensions/Squidex.Extensions/Actions/RuleHelper.cs +++ b/backend/extensions/Squidex.Extensions/Actions/RuleHelper.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Scripting; diff --git a/backend/extensions/Squidex.Extensions/Actions/Script/ScriptActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Script/ScriptActionHandler.cs index fe06e6fe3..f769da74d 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Script/ScriptActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Script/ScriptActionHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Scripting; diff --git a/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRAction.cs b/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRAction.cs index 7bd6e3923..e6ec8bc7b 100644 --- a/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRActionHandler.cs index 383f7b98e..a301383b7 100644 --- a/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/SignalR/SignalRActionHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; using Microsoft.Azure.SignalR.Management; using Squidex.Domain.Apps.Core.HandleRules; @@ -16,12 +14,12 @@ namespace Squidex.Extensions.Actions.SignalR { public sealed class SignalRActionHandler : RuleActionHandler { - private readonly ClientPool<(string ConnectionString, string HubName), IServiceManager> clients; + private readonly ClientPool<(string ConnectionString, string HubName), ServiceManager> clients; public SignalRActionHandler(RuleEventFormatter formatter) : base(formatter) { - clients = new ClientPool<(string ConnectionString, string HubName), IServiceManager>(key => + clients = new ClientPool<(string ConnectionString, string HubName), ServiceManager>(key => { var serviceManager = new ServiceManagerBuilder() .WithOptions(option => @@ -29,7 +27,7 @@ namespace Squidex.Extensions.Actions.SignalR option.ConnectionString = key.ConnectionString; option.ServiceTransportType = ServiceTransportType.Transient; }) - .Build(); + .BuildServiceManager(); return serviceManager; }); diff --git a/backend/extensions/Squidex.Extensions/Actions/Slack/SlackAction.cs b/backend/extensions/Squidex.Extensions/Actions/Slack/SlackAction.cs index 0384290b7..fe11679ab 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Slack/SlackAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Slack/SlackAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs index 3014610ae..8c6a812f6 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Net.Http; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs index 1a3c12882..038277d75 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using CoreTweet; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookAction.cs b/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookAction.cs index 71b690d2a..b7d46a121 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookAction.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookAction.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs b/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs index 0efe04e86..2cfcc2898 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Net.Http; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Infrastructure; @@ -78,7 +73,7 @@ namespace Squidex.Extensions.Actions.Webhook if (indexEqual > 0 && indexEqual < line.Length - 1) { - var headerKey = line.Substring(0, indexEqual); + var headerKey = line[..indexEqual]; var headerValue = line[(indexEqual + 1)..]; headerValue = await FormatAsync(headerValue, @event); diff --git a/backend/extensions/Squidex.Extensions/Assets/Azure/AzureMetadataSource.cs b/backend/extensions/Squidex.Extensions/Assets/Azure/AzureMetadataSource.cs index c66a62444..82ffd52f7 100644 --- a/backend/extensions/Squidex.Extensions/Assets/Azure/AzureMetadataSource.cs +++ b/backend/extensions/Squidex.Extensions/Assets/Azure/AzureMetadataSource.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Azure.CognitiveServices.Vision.ComputerVision; using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models; using Microsoft.Extensions.Options; diff --git a/backend/extensions/Squidex.Extensions/Samples/AssetStore/MemoryAssetStorePlugin.cs b/backend/extensions/Squidex.Extensions/Samples/AssetStore/MemoryAssetStorePlugin.cs index 293da57f2..376e656f2 100644 --- a/backend/extensions/Squidex.Extensions/Samples/AssetStore/MemoryAssetStorePlugin.cs +++ b/backend/extensions/Squidex.Extensions/Samples/AssetStore/MemoryAssetStorePlugin.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; diff --git a/backend/extensions/Squidex.Extensions/Samples/Middleware/DoubleLinkedContentMiddleware.cs b/backend/extensions/Squidex.Extensions/Samples/Middleware/DoubleLinkedContentMiddleware.cs index ed09dc2f2..8f4b0747a 100644 --- a/backend/extensions/Squidex.Extensions/Samples/Middleware/DoubleLinkedContentMiddleware.cs +++ b/backend/extensions/Squidex.Extensions/Samples/Middleware/DoubleLinkedContentMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; diff --git a/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateInstance.cs b/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateInstance.cs index 0bf014a78..0bdcb9716 100644 --- a/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateInstance.cs +++ b/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateInstance.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Apps.Templates; using Squidex.Domain.Apps.Entities.Apps.Templates.Builders; diff --git a/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateMiddleware.cs b/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateMiddleware.cs index 0e9e43bb8..c3bb49fea 100644 --- a/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateMiddleware.cs +++ b/backend/extensions/Squidex.Extensions/Samples/Middleware/TemplateMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities.Apps.Commands; diff --git a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj index e5c45f381..24b9f66d8 100644 --- a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj +++ b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj @@ -1,36 +1,38 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable - + - + - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + - - + + - - + + diff --git a/backend/extensions/Squidex.Extensions/Text/Azure/AzureIndexDefinition.cs b/backend/extensions/Squidex.Extensions/Text/Azure/AzureIndexDefinition.cs index d7bfde33d..fcaa67b7d 100644 --- a/backend/extensions/Squidex.Extensions/Text/Azure/AzureIndexDefinition.cs +++ b/backend/extensions/Squidex.Extensions/Text/Azure/AzureIndexDefinition.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using Azure.Search.Documents.Indexes.Models; diff --git a/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextIndex.cs b/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextIndex.cs index 120f5ec70..6eff08ff3 100644 --- a/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextIndex.cs +++ b/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextIndex.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Azure; using Azure.Search.Documents; using Azure.Search.Documents.Indexes; diff --git a/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextPlugin.cs b/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextPlugin.cs index f8d60bd33..89fae82d3 100644 --- a/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextPlugin.cs +++ b/backend/extensions/Squidex.Extensions/Text/Azure/AzureTextPlugin.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Entities.Contents.Text; diff --git a/backend/extensions/Squidex.Extensions/Text/Azure/CommandFactory.cs b/backend/extensions/Squidex.Extensions/Text/Azure/CommandFactory.cs index 97b0a30d8..afde1d6f8 100644 --- a/backend/extensions/Squidex.Extensions/Text/Azure/CommandFactory.cs +++ b/backend/extensions/Squidex.Extensions/Text/Azure/CommandFactory.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Text; using Azure.Search.Documents.Models; using GeoJSON.Net.Geometry; diff --git a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/CommandFactory.cs b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/CommandFactory.cs index a4271c375..706ca6010 100644 --- a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/CommandFactory.cs +++ b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/CommandFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using GeoJSON.Net.Geometry; using Squidex.Domain.Apps.Entities.Contents.Text; diff --git a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchIndexDefinition.cs b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchIndexDefinition.cs index 53bac5839..abfdd6120 100644 --- a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchIndexDefinition.cs +++ b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchIndexDefinition.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Elasticsearch.Net; namespace Squidex.Extensions.Text.ElasticSearch diff --git a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextIndex.cs b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextIndex.cs index 1299748c0..dadf08252 100644 --- a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextIndex.cs +++ b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextIndex.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; using Elasticsearch.Net; using Newtonsoft.Json; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextPlugin.cs b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextPlugin.cs index 9510c9273..d5bcdc52d 100644 --- a/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextPlugin.cs +++ b/backend/extensions/Squidex.Extensions/Text/ElasticSearch/ElasticSearchTextPlugin.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Entities.Contents.Text; diff --git a/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs b/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs index 945bf7d24..0e5e9d08a 100644 --- a/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs +++ b/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs b/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs index ad8d053a5..efb3e6b51 100644 --- a/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs +++ b/backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Core.ValidateContent; using Squidex.Domain.Apps.Entities.Contents.Repositories; diff --git a/backend/i18n/translator/Squidex.Translator/Commands.cs b/backend/i18n/translator/Squidex.Translator/Commands.cs index 4a6425a75..1d0c9fc06 100644 --- a/backend/i18n/translator/Squidex.Translator/Commands.cs +++ b/backend/i18n/translator/Squidex.Translator/Commands.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using CommandDotNet; using FluentValidation; using FluentValidation.Attributes; @@ -92,7 +88,7 @@ namespace Squidex.Translator [Command(Name = "clean-backend", Description = "Clean the backend translations.")] public void CleanBackend(TranslateArguments arguments) { - var (folder, service) = Setup(arguments, "backend"); + var (_, service) = Setup(arguments, "backend"); Helper.CleanOtherLocales(service); @@ -102,7 +98,7 @@ namespace Squidex.Translator [Command(Name = "clean-frontend", Description = "Clean the frontend translations.")] public void CleanFrontend(TranslateArguments arguments) { - var (folder, service) = Setup(arguments, "frontend"); + var (_, service) = Setup(arguments, "frontend"); Helper.CleanOtherLocales(service); @@ -141,7 +137,7 @@ namespace Squidex.Translator { if (!Directory.Exists(arguments.Folder)) { - throw new ArgumentException("Folder does not exist."); + throw new ArgumentException("Folder does not exist.", nameof(arguments)); } var supportedLocales = new string[] { "en", "nl", "it", "zh" }; diff --git a/backend/i18n/translator/Squidex.Translator/Extensions.cs b/backend/i18n/translator/Squidex.Translator/Extensions.cs index 843feefd0..79f7bb62a 100644 --- a/backend/i18n/translator/Squidex.Translator/Extensions.cs +++ b/backend/i18n/translator/Squidex.Translator/Extensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; - namespace Squidex.Translator { public static class Extensions @@ -18,7 +16,7 @@ namespace Squidex.Translator public static bool IsPotentialMultiWordText(this string text) { - return text.Contains(' ') && text.IsPotentialText(); + return text.Contains(' ', StringComparison.Ordinal) && text.IsPotentialText(); } } } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/Backend.cs b/backend/i18n/translator/Squidex.Translator/Processes/Backend.cs index f708f8212..88ec17dd3 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/Backend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/Backend.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; -using System.Linq; - namespace Squidex.Translator.Processes { public static class Backend @@ -28,7 +24,8 @@ namespace Squidex.Translator.Processes { var relativeName = Helper.RelativeName(file, folder); - if (relativeName.Contains("/obj/") || relativeName.Contains("/bin/")) + if (relativeName.Contains("/obj/", StringComparison.Ordinal) || + relativeName.Contains("/bin/", StringComparison.Ordinal)) { continue; } @@ -45,7 +42,8 @@ namespace Squidex.Translator.Processes { var relativeName = Helper.RelativeName(file, folder); - if (relativeName.Contains("/obj/") || relativeName.Contains("/bin/")) + if (relativeName.Contains("/obj/", StringComparison.Ordinal) || + relativeName.Contains("/bin/", StringComparison.Ordinal)) { continue; } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/CheckBackend.cs b/backend/i18n/translator/Squidex.Translator/Processes/CheckBackend.cs index b7bcf0e47..32fddcf63 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/CheckBackend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/CheckBackend.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; using System.Text.RegularExpressions; using Squidex.Translator.State; @@ -36,7 +34,7 @@ namespace Squidex.Translator.Processes void AddTranslations(string regex) { - var matches = Regex.Matches(content, regex, RegexOptions.Singleline); + var matches = Regex.Matches(content, regex, RegexOptions.Singleline | RegexOptions.ExplicitCapture); foreach (Match match in matches) { diff --git a/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs b/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs index ef215cd1a..6aae977fd 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/CheckFrontend.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; using System.Text.RegularExpressions; using Squidex.Translator.State; @@ -58,7 +56,7 @@ namespace Squidex.Translator.Processes service.Save(); } - private HashSet GetTranslationsInTemplate(FileInfo file) + private static HashSet GetTranslationsInTemplate(FileInfo file) { var content = File.ReadAllText(file.FullName); @@ -66,7 +64,7 @@ namespace Squidex.Translator.Processes void AddTranslations(string regex) { - var matches = Regex.Matches(content, regex, RegexOptions.Singleline); + var matches = Regex.Matches(content, regex, RegexOptions.Singleline | RegexOptions.ExplicitCapture); foreach (Match match in matches) { @@ -81,7 +79,7 @@ namespace Squidex.Translator.Processes return translations; } - private HashSet GetTranslationsInTypescript(FileInfo file) + private static HashSet GetTranslationsInTypescript(FileInfo file) { var content = File.ReadAllText(file.FullName); @@ -89,7 +87,7 @@ namespace Squidex.Translator.Processes void AddTranslations(string regex) { - var matches = Regex.Matches(content, regex, RegexOptions.Singleline); + var matches = Regex.Matches(content, regex, RegexOptions.Singleline | RegexOptions.ExplicitCapture); foreach (Match match in matches) { diff --git a/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs b/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs index 92e684aa3..978aa8faf 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; - namespace Squidex.Translator.Processes { public static class Frontend diff --git a/backend/i18n/translator/Squidex.Translator/Processes/GenerateBackendResources.cs b/backend/i18n/translator/Squidex.Translator/Processes/GenerateBackendResources.cs index 8a13038eb..0c630aac1 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/GenerateBackendResources.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/GenerateBackendResources.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using System.Resources.NetStandard; using System.Text.RegularExpressions; using Squidex.Translator.State; @@ -58,8 +56,8 @@ namespace Squidex.Translator.Processes var text = File.ReadAllText(fullName); - text = text.Replace("System.Resources.NetStandard.ResXResourceReader, System.Resources.NetStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); - text = text.Replace("System.Resources.NetStandard.ResXResourceWriter, System.Resources.NetStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); + text = text.Replace("System.Resources.NetStandard.ResXResourceReader, System.Resources.NetStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", StringComparison.Ordinal); + text = text.Replace("System.Resources.NetStandard.ResXResourceWriter, System.Resources.NetStandard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", StringComparison.Ordinal); File.WriteAllText(fullName, text); } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/GenerateFrontendResources.cs b/backend/i18n/translator/Squidex.Translator/Processes/GenerateFrontendResources.cs index 18de237df..a6c994613 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/GenerateFrontendResources.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/GenerateFrontendResources.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; using Squidex.Translator.State; namespace Squidex.Translator.Processes diff --git a/backend/i18n/translator/Squidex.Translator/Processes/GenerateKeys.cs b/backend/i18n/translator/Squidex.Translator/Processes/GenerateKeys.cs index e6d52fa29..3b49886f3 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/GenerateKeys.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/GenerateKeys.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; using Squidex.Translator.State; namespace Squidex.Translator.Processes diff --git a/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs b/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs index 97612fc8a..3c3719ac5 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/Helper.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using Squidex.Translator.State; namespace Squidex.Translator.Processes @@ -17,7 +13,7 @@ namespace Squidex.Translator.Processes { public static string RelativeName(FileInfo file, DirectoryInfo folder) { - return file.FullName[folder.FullName.Length..].Replace("\\", "/"); + return file.FullName[folder.FullName.Length..].Replace("\\", "/", StringComparison.Ordinal); } public static void CheckOtherLocales(TranslationService service) diff --git a/backend/i18n/translator/Squidex.Translator/Processes/TranslateBackend.cs b/backend/i18n/translator/Squidex.Translator/Processes/TranslateBackend.cs index aaa2bc885..027ad79f5 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/TranslateBackend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/TranslateBackend.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using System.Text.RegularExpressions; using Squidex.Translator.State; diff --git a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs index 18bd280fc..0d1c56c68 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTemplates.cs @@ -5,16 +5,10 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Text.RegularExpressions; using HtmlAgilityPack; using Squidex.Translator.State; -#pragma warning disable SA1025 // Code should not contain multiple whitespace in a row - namespace Squidex.Translator.Processes { public class TranslateTemplates @@ -100,12 +94,12 @@ namespace Squidex.Translator.Processes while (trimmed.StartsWith(whitespace, StringComparison.OrdinalIgnoreCase)) { - trimmed = trimmed.Substring(whitespace.Length); + trimmed = trimmed[whitespace.Length..]; } while (trimmed.EndsWith(whitespace, StringComparison.OrdinalIgnoreCase)) { - trimmed = trimmed.Substring(0, trimmed.Length - whitespace.Length); + trimmed = trimmed[..^whitespace.Length]; } if (!string.IsNullOrWhiteSpace(trimmed) && !IsTranslated(trimmed) && !IsVariable(trimmed)) @@ -115,8 +109,8 @@ namespace Squidex.Translator.Processes // Extract prefix and suffix to keep our original indentation. var originalIndex = text.IndexOf(trimmed, StringComparison.Ordinal); - var originalPrefix = text.Substring(0, originalIndex); - var originalSuffix = text.Substring(originalIndex + trimmed.Length); + var originalPrefix = text[..originalIndex]; + var originalSuffix = text[(originalIndex + trimmed.Length)..]; var originText = $"text in {textNode.ParentNode.Name}"; @@ -153,7 +147,7 @@ namespace Squidex.Translator.Processes } else { - if (attribute.Name.Contains("[")) + if (attribute.Name.Contains('[', StringComparison.Ordinal)) { node.SetAttributeValue(attribute.Name, $"{{{{ '{key}' | sqxTranslate }}}}"); } @@ -177,20 +171,20 @@ namespace Squidex.Translator.Processes private static bool IsPipe(HtmlAttribute attribute) { - return attribute.Value.Contains("{"); + return attribute.Value.Contains('{', StringComparison.Ordinal); } - private bool IsTranslatedAttribute(string text) + private static bool IsTranslatedAttribute(string text) { - return text.Contains("i18n:"); + return text.Contains("i18n:", StringComparison.Ordinal); } - private bool IsTranslated(string text) + private static bool IsTranslated(string text) { - return text.Contains("| sqxTranslate"); + return text.Contains("| sqxTranslate", StringComparison.Ordinal); } - private bool IsVariable(string text) + private static bool IsVariable(string text) { return text.StartsWith("{{", StringComparison.Ordinal) && Regex.Matches(text, "\\}\\}").Count == 1; } diff --git a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTypescript.cs b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTypescript.cs index 2ca21b13b..fddf0dae2 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/TranslateTypescript.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/TranslateTypescript.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using System.Text.RegularExpressions; using Squidex.Translator.State; diff --git a/backend/i18n/translator/Squidex.Translator/Program.cs b/backend/i18n/translator/Squidex.Translator/Program.cs index 9fafa076d..dc6cf2a64 100644 --- a/backend/i18n/translator/Squidex.Translator/Program.cs +++ b/backend/i18n/translator/Squidex.Translator/Program.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using CommandDotNet; using CommandDotNet.FluentValidation; diff --git a/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj b/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj index 7b0c08cdc..d576b81dd 100644 --- a/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj +++ b/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj @@ -2,16 +2,24 @@ Exe - net5.0 + net6.0 + 10.0 + enable + NU1608 - - - - - - + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs index d8f77598c..003173187 100644 --- a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs +++ b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslatedText.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Translator.State.Old { public class OldTranslatedText diff --git a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs index 0e930259e..af9b9b4a8 100644 --- a/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs +++ b/backend/i18n/translator/Squidex.Translator/State/Old/OldTranslationState.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Translator.State.Old { public class OldTranslationState diff --git a/backend/i18n/translator/Squidex.Translator/State/TranslatedTexts.cs b/backend/i18n/translator/Squidex.Translator/State/TranslatedTexts.cs index bed5da223..dfb02e7f5 100644 --- a/backend/i18n/translator/Squidex.Translator/State/TranslatedTexts.cs +++ b/backend/i18n/translator/Squidex.Translator/State/TranslatedTexts.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Translator.State { public sealed class TranslatedTexts : SortedDictionary diff --git a/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs b/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs index 576936a23..dd5d9c17d 100644 --- a/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs +++ b/backend/i18n/translator/Squidex.Translator/State/TranslationService.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.Globalization; using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; @@ -175,7 +172,7 @@ namespace Squidex.Translator.State public void Translate(string fileName, string text, string originText, Action handler, bool silent = false) { - if (onlySingleWords && text.Contains(' ')) + if (onlySingleWords && text.Contains(' ', StringComparison.Ordinal)) { return; } @@ -205,7 +202,7 @@ namespace Squidex.Translator.State if (string.IsNullOrWhiteSpace(key)) { - key = $"common.{text.ToLower()}"; + key = $"common.{text.ToLower(CultureInfo.InvariantCulture)}"; if (translations.TryGetValue(key, out var existing)) { @@ -221,21 +218,22 @@ namespace Squidex.Translator.State break; } - else if (key.Equals("s", StringComparison.OrdinalIgnoreCase) == true) + + if (key.Equals("s", StringComparison.OrdinalIgnoreCase)) { Console.WriteLine("Skipped"); } - else if (key.Equals("i", StringComparison.OrdinalIgnoreCase) == true) + else if (key.Equals("i", StringComparison.OrdinalIgnoreCase)) { Console.WriteLine("Ignored"); AddIgnore(fileName, text); } - else if (key.Equals("f", StringComparison.OrdinalIgnoreCase) == true) + else if (key.Equals("f", StringComparison.OrdinalIgnoreCase)) { Console.WriteLine("Ignored File"); AddIgnore(fileName, "*"); } - else if (key.Equals("t", StringComparison.OrdinalIgnoreCase) == true) + else if (key.Equals("t", StringComparison.OrdinalIgnoreCase)) { Console.WriteLine("ToDo"); AddTodo(fileName, text); @@ -244,7 +242,7 @@ namespace Squidex.Translator.State } else { - if (!key.Contains(".")) + if (!key.Contains('.', StringComparison.Ordinal)) { if (previousPrefix != null) { diff --git a/backend/i18n/translator/Squidex.Translator/State/TranslationTodos.cs b/backend/i18n/translator/Squidex.Translator/State/TranslationTodos.cs index bdb645ea9..87c127281 100644 --- a/backend/i18n/translator/Squidex.Translator/State/TranslationTodos.cs +++ b/backend/i18n/translator/Squidex.Translator/State/TranslationTodos.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Translator.State { public sealed class TranslationTodos : SortedDictionary> diff --git a/backend/i18n/translator/Squidex.Translator/State/TranslationsToIgnore.cs b/backend/i18n/translator/Squidex.Translator/State/TranslationsToIgnore.cs index 731a0d5aa..280291169 100644 --- a/backend/i18n/translator/Squidex.Translator/State/TranslationsToIgnore.cs +++ b/backend/i18n/translator/Squidex.Translator/State/TranslationsToIgnore.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Translator.State { public sealed class TranslationsToIgnore : SortedDictionary> diff --git a/backend/src/Migrations/MigrationPath.cs b/backend/src/Migrations/MigrationPath.cs index ca84f7845..2784c5ba8 100644 --- a/backend/src/Migrations/MigrationPath.cs +++ b/backend/src/Migrations/MigrationPath.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Microsoft.Extensions.DependencyInjection; using Migrations.Migrations; using Migrations.Migrations.MongoDb; diff --git a/backend/src/Migrations/Migrations.csproj b/backend/src/Migrations/Migrations.csproj index c29900a13..50023910e 100644 --- a/backend/src/Migrations/Migrations.csproj +++ b/backend/src/Migrations/Migrations.csproj @@ -1,11 +1,12 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Migrations/Migrations/ClearRules.cs b/backend/src/Migrations/Migrations/ClearRules.cs index e3b0d00ca..a3de3f516 100644 --- a/backend/src/Migrations/Migrations/ClearRules.cs +++ b/backend/src/Migrations/Migrations/ClearRules.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules.DomainObject; using Squidex.Infrastructure.Migrations; using Squidex.Infrastructure.States; diff --git a/backend/src/Migrations/Migrations/ClearSchemas.cs b/backend/src/Migrations/Migrations/ClearSchemas.cs index bd0eacf39..f5b2a4c27 100644 --- a/backend/src/Migrations/Migrations/ClearSchemas.cs +++ b/backend/src/Migrations/Migrations/ClearSchemas.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Schemas.DomainObject; using Squidex.Infrastructure.Migrations; using Squidex.Infrastructure.States; diff --git a/backend/src/Migrations/Migrations/ConvertEventStore.cs b/backend/src/Migrations/Migrations/ConvertEventStore.cs index 3e30bde3b..02f41301e 100644 --- a/backend/src/Migrations/Migrations/ConvertEventStore.cs +++ b/backend/src/Migrations/Migrations/ConvertEventStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/Migrations/ConvertEventStoreAppId.cs b/backend/src/Migrations/Migrations/ConvertEventStoreAppId.cs index d0f741754..61f54ebce 100644 --- a/backend/src/Migrations/Migrations/ConvertEventStoreAppId.cs +++ b/backend/src/Migrations/Migrations/ConvertEventStoreAppId.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure; diff --git a/backend/src/Migrations/Migrations/CreateAssetSlugs.cs b/backend/src/Migrations/Migrations/CreateAssetSlugs.cs index 3ae71e9d5..4eba02826 100644 --- a/backend/src/Migrations/Migrations/CreateAssetSlugs.cs +++ b/backend/src/Migrations/Migrations/CreateAssetSlugs.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets.DomainObject; using Squidex.Infrastructure; diff --git a/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs b/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs index 2153451b2..ffb76b8c1 100644 --- a/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs +++ b/backend/src/Migrations/Migrations/MongoDb/AddAppIdToEventStream.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using MongoDB.Bson; using MongoDB.Driver; @@ -72,7 +68,7 @@ namespace Migrations.Migrations.MongoDb indexOfId = indexOfOldId + 2; } - var domainType = eventStream.Substring(0, indexOfType); + var domainType = eventStream[..indexOfType]; var domainId = eventStream[indexOfId..]; var newDomainId = DomainId.Combine(DomainId.Create(appId), DomainId.Create(domainId)).ToString(); diff --git a/backend/src/Migrations/Migrations/MongoDb/ConvertDocumentIds.cs b/backend/src/Migrations/Migrations/MongoDb/ConvertDocumentIds.cs index 71f6c68ef..885713b1b 100644 --- a/backend/src/Migrations/Migrations/MongoDb/ConvertDocumentIds.cs +++ b/backend/src/Migrations/Migrations/MongoDb/ConvertDocumentIds.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using MongoDB.Bson; using MongoDB.Driver; diff --git a/backend/src/Migrations/Migrations/MongoDb/ConvertOldSnapshotStores.cs b/backend/src/Migrations/Migrations/MongoDb/ConvertOldSnapshotStores.cs index 7d638e172..64ca6528c 100644 --- a/backend/src/Migrations/Migrations/MongoDb/ConvertOldSnapshotStores.cs +++ b/backend/src/Migrations/Migrations/MongoDb/ConvertOldSnapshotStores.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/MongoDb/ConvertRuleEventsJson.cs b/backend/src/Migrations/Migrations/MongoDb/ConvertRuleEventsJson.cs index c8e21eee0..6156c1167 100644 --- a/backend/src/Migrations/Migrations/MongoDb/ConvertRuleEventsJson.cs +++ b/backend/src/Migrations/Migrations/MongoDb/ConvertRuleEventsJson.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/MongoDb/DeleteContentCollections.cs b/backend/src/Migrations/Migrations/MongoDb/DeleteContentCollections.cs index 4754d6baf..8020f7251 100644 --- a/backend/src/Migrations/Migrations/MongoDb/DeleteContentCollections.cs +++ b/backend/src/Migrations/Migrations/MongoDb/DeleteContentCollections.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/MongoDb/RenameAssetMetadata.cs b/backend/src/Migrations/Migrations/MongoDb/RenameAssetMetadata.cs index f42c8f52a..b93178044 100644 --- a/backend/src/Migrations/Migrations/MongoDb/RenameAssetMetadata.cs +++ b/backend/src/Migrations/Migrations/MongoDb/RenameAssetMetadata.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/MongoDb/RenameAssetSlugField.cs b/backend/src/Migrations/Migrations/MongoDb/RenameAssetSlugField.cs index 9d5c28e4d..e7cf56e55 100644 --- a/backend/src/Migrations/Migrations/MongoDb/RenameAssetSlugField.cs +++ b/backend/src/Migrations/Migrations/MongoDb/RenameAssetSlugField.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/MongoDb/RestructureContentCollection.cs b/backend/src/Migrations/Migrations/MongoDb/RestructureContentCollection.cs index 56d20bca6..fdedfde64 100644 --- a/backend/src/Migrations/Migrations/MongoDb/RestructureContentCollection.cs +++ b/backend/src/Migrations/Migrations/MongoDb/RestructureContentCollection.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildApps.cs b/backend/src/Migrations/Migrations/RebuildApps.cs index ffc193696..9b400886b 100644 --- a/backend/src/Migrations/Migrations/RebuildApps.cs +++ b/backend/src/Migrations/Migrations/RebuildApps.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildAssetFolders.cs b/backend/src/Migrations/Migrations/RebuildAssetFolders.cs index 24bb986b2..af76b54a6 100644 --- a/backend/src/Migrations/Migrations/RebuildAssetFolders.cs +++ b/backend/src/Migrations/Migrations/RebuildAssetFolders.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildAssets.cs b/backend/src/Migrations/Migrations/RebuildAssets.cs index 98ac9a0f5..1375f900e 100644 --- a/backend/src/Migrations/Migrations/RebuildAssets.cs +++ b/backend/src/Migrations/Migrations/RebuildAssets.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildContents.cs b/backend/src/Migrations/Migrations/RebuildContents.cs index 6fc6cddbb..62ef7b52a 100644 --- a/backend/src/Migrations/Migrations/RebuildContents.cs +++ b/backend/src/Migrations/Migrations/RebuildContents.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildRules.cs b/backend/src/Migrations/Migrations/RebuildRules.cs index 7f4da766e..51f7c3f87 100644 --- a/backend/src/Migrations/Migrations/RebuildRules.cs +++ b/backend/src/Migrations/Migrations/RebuildRules.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildSchemas.cs b/backend/src/Migrations/Migrations/RebuildSchemas.cs index 01f7a2270..47447c624 100644 --- a/backend/src/Migrations/Migrations/RebuildSchemas.cs +++ b/backend/src/Migrations/Migrations/RebuildSchemas.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/RebuildSnapshots.cs b/backend/src/Migrations/Migrations/RebuildSnapshots.cs index bc5e350ac..e14b69f6e 100644 --- a/backend/src/Migrations/Migrations/RebuildSnapshots.cs +++ b/backend/src/Migrations/Migrations/RebuildSnapshots.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/StartEventConsumers.cs b/backend/src/Migrations/Migrations/StartEventConsumers.cs index 4551da9ea..c02a9e165 100644 --- a/backend/src/Migrations/Migrations/StartEventConsumers.cs +++ b/backend/src/Migrations/Migrations/StartEventConsumers.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure.EventSourcing.Grains; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/Migrations/StopEventConsumers.cs b/backend/src/Migrations/Migrations/StopEventConsumers.cs index a3f4b40be..14d4903e8 100644 --- a/backend/src/Migrations/Migrations/StopEventConsumers.cs +++ b/backend/src/Migrations/Migrations/StopEventConsumers.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure.EventSourcing.Grains; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/OldEvents/AppClientChanged.cs b/backend/src/Migrations/OldEvents/AppClientChanged.cs index 22e35a353..33072a432 100644 --- a/backend/src/Migrations/OldEvents/AppClientChanged.cs +++ b/backend/src/Migrations/OldEvents/AppClientChanged.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/OldEvents/AppClientPermission.cs b/backend/src/Migrations/OldEvents/AppClientPermission.cs index 78d214ee3..2ce2cfc73 100644 --- a/backend/src/Migrations/OldEvents/AppClientPermission.cs +++ b/backend/src/Migrations/OldEvents/AppClientPermission.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Migrations.OldEvents { [Obsolete("New Event introduced")] diff --git a/backend/src/Migrations/OldEvents/AppClientUpdated.cs b/backend/src/Migrations/OldEvents/AppClientUpdated.cs index c5443aa62..6d600295f 100644 --- a/backend/src/Migrations/OldEvents/AppClientUpdated.cs +++ b/backend/src/Migrations/OldEvents/AppClientUpdated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/AppContributorAssigned.cs b/backend/src/Migrations/OldEvents/AppContributorAssigned.cs index 280ad3532..a3fb27579 100644 --- a/backend/src/Migrations/OldEvents/AppContributorAssigned.cs +++ b/backend/src/Migrations/OldEvents/AppContributorAssigned.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/AppContributorPermission.cs b/backend/src/Migrations/OldEvents/AppContributorPermission.cs index cc81d312d..b41e073da 100644 --- a/backend/src/Migrations/OldEvents/AppContributorPermission.cs +++ b/backend/src/Migrations/OldEvents/AppContributorPermission.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Migrations.OldEvents { [Obsolete("New Event introduced")] diff --git a/backend/src/Migrations/OldEvents/AppPatternAdded.cs b/backend/src/Migrations/OldEvents/AppPatternAdded.cs index 9462d3660..81fcdb4b9 100644 --- a/backend/src/Migrations/OldEvents/AppPatternAdded.cs +++ b/backend/src/Migrations/OldEvents/AppPatternAdded.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Migrations/OldEvents/AppPatternDeleted.cs b/backend/src/Migrations/OldEvents/AppPatternDeleted.cs index 922cdd68f..a28f9ab8e 100644 --- a/backend/src/Migrations/OldEvents/AppPatternDeleted.cs +++ b/backend/src/Migrations/OldEvents/AppPatternDeleted.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Apps; diff --git a/backend/src/Migrations/OldEvents/AppPatternUpdated.cs b/backend/src/Migrations/OldEvents/AppPatternUpdated.cs index b0c363f15..09b9399ff 100644 --- a/backend/src/Migrations/OldEvents/AppPatternUpdated.cs +++ b/backend/src/Migrations/OldEvents/AppPatternUpdated.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Migrations/OldEvents/AppPlanChanged.cs b/backend/src/Migrations/OldEvents/AppPlanChanged.cs index 9a160ce39..78d27d9dd 100644 --- a/backend/src/Migrations/OldEvents/AppPlanChanged.cs +++ b/backend/src/Migrations/OldEvents/AppPlanChanged.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Apps; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/AppWorkflowConfigured.cs b/backend/src/Migrations/OldEvents/AppWorkflowConfigured.cs index 5f5b96d2d..07aa06c77 100644 --- a/backend/src/Migrations/OldEvents/AppWorkflowConfigured.cs +++ b/backend/src/Migrations/OldEvents/AppWorkflowConfigured.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Apps; diff --git a/backend/src/Migrations/OldEvents/AssetCreated.cs b/backend/src/Migrations/OldEvents/AssetCreated.cs index d629a3cd1..72f1d9933 100644 --- a/backend/src/Migrations/OldEvents/AssetCreated.cs +++ b/backend/src/Migrations/OldEvents/AssetCreated.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/AssetRenamed.cs b/backend/src/Migrations/OldEvents/AssetRenamed.cs index f4a5bc756..b02ec840b 100644 --- a/backend/src/Migrations/OldEvents/AssetRenamed.cs +++ b/backend/src/Migrations/OldEvents/AssetRenamed.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/OldEvents/AssetTagged.cs b/backend/src/Migrations/OldEvents/AssetTagged.cs index 27c7f3466..64cf86d04 100644 --- a/backend/src/Migrations/OldEvents/AssetTagged.cs +++ b/backend/src/Migrations/OldEvents/AssetTagged.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/OldEvents/ContentArchived.cs b/backend/src/Migrations/OldEvents/ContentArchived.cs index 6cee48be5..85b269abf 100644 --- a/backend/src/Migrations/OldEvents/ContentArchived.cs +++ b/backend/src/Migrations/OldEvents/ContentArchived.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentChangesDiscarded.cs b/backend/src/Migrations/OldEvents/ContentChangesDiscarded.cs index 393b8d029..951a8ebab 100644 --- a/backend/src/Migrations/OldEvents/ContentChangesDiscarded.cs +++ b/backend/src/Migrations/OldEvents/ContentChangesDiscarded.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Migrations/OldEvents/ContentChangesPublished.cs b/backend/src/Migrations/OldEvents/ContentChangesPublished.cs index 5a15632f1..0be5a5f7d 100644 --- a/backend/src/Migrations/OldEvents/ContentChangesPublished.cs +++ b/backend/src/Migrations/OldEvents/ContentChangesPublished.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentCreated.cs b/backend/src/Migrations/OldEvents/ContentCreated.cs index d291fbd79..ce07e9e3e 100644 --- a/backend/src/Migrations/OldEvents/ContentCreated.cs +++ b/backend/src/Migrations/OldEvents/ContentCreated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentPublished.cs b/backend/src/Migrations/OldEvents/ContentPublished.cs index 865b75d77..642f2dbdf 100644 --- a/backend/src/Migrations/OldEvents/ContentPublished.cs +++ b/backend/src/Migrations/OldEvents/ContentPublished.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentRestored.cs b/backend/src/Migrations/OldEvents/ContentRestored.cs index e098edada..9bb64cd08 100644 --- a/backend/src/Migrations/OldEvents/ContentRestored.cs +++ b/backend/src/Migrations/OldEvents/ContentRestored.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentStatusChanged.cs b/backend/src/Migrations/OldEvents/ContentStatusChanged.cs index af6067065..e84015541 100644 --- a/backend/src/Migrations/OldEvents/ContentStatusChanged.cs +++ b/backend/src/Migrations/OldEvents/ContentStatusChanged.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentUnpublished.cs b/backend/src/Migrations/OldEvents/ContentUnpublished.cs index 159b06c27..aef733d76 100644 --- a/backend/src/Migrations/OldEvents/ContentUnpublished.cs +++ b/backend/src/Migrations/OldEvents/ContentUnpublished.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/ContentUpdateProposed.cs b/backend/src/Migrations/OldEvents/ContentUpdateProposed.cs index e84df3c48..20ca42b67 100644 --- a/backend/src/Migrations/OldEvents/ContentUpdateProposed.cs +++ b/backend/src/Migrations/OldEvents/ContentUpdateProposed.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Events.Contents; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/SchemaCreated.cs b/backend/src/Migrations/OldEvents/SchemaCreated.cs index 3d0b0dadc..ec8f4c8ec 100644 --- a/backend/src/Migrations/OldEvents/SchemaCreated.cs +++ b/backend/src/Migrations/OldEvents/SchemaCreated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Migrations/OldEvents/ScriptsConfigured.cs b/backend/src/Migrations/OldEvents/ScriptsConfigured.cs index 343c4e2d2..0eab6b129 100644 --- a/backend/src/Migrations/OldEvents/ScriptsConfigured.cs +++ b/backend/src/Migrations/OldEvents/ScriptsConfigured.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Schemas; diff --git a/backend/src/Migrations/OldEvents/WebhookAdded.cs b/backend/src/Migrations/OldEvents/WebhookAdded.cs index c167963b0..676c8c508 100644 --- a/backend/src/Migrations/OldEvents/WebhookAdded.cs +++ b/backend/src/Migrations/OldEvents/WebhookAdded.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldEvents/WebhookDeleted.cs b/backend/src/Migrations/OldEvents/WebhookDeleted.cs index e99f18d60..9596a0a28 100644 --- a/backend/src/Migrations/OldEvents/WebhookDeleted.cs +++ b/backend/src/Migrations/OldEvents/WebhookDeleted.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Migrations/OldTriggers/AssetChangedTrigger.cs b/backend/src/Migrations/OldTriggers/AssetChangedTrigger.cs index 7bb91c365..4b0c096e0 100644 --- a/backend/src/Migrations/OldTriggers/AssetChangedTrigger.cs +++ b/backend/src/Migrations/OldTriggers/AssetChangedTrigger.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Migrations/OldTriggers/ContentChangedTrigger.cs b/backend/src/Migrations/OldTriggers/ContentChangedTrigger.cs index 690f2242c..0acb250b5 100644 --- a/backend/src/Migrations/OldTriggers/ContentChangedTrigger.cs +++ b/backend/src/Migrations/OldTriggers/ContentChangedTrigger.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.Triggers; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Migrations/OldTriggers/ContentChangedTriggerSchema.cs b/backend/src/Migrations/OldTriggers/ContentChangedTriggerSchema.cs index db0e52380..cbb601475 100644 --- a/backend/src/Migrations/OldTriggers/ContentChangedTriggerSchema.cs +++ b/backend/src/Migrations/OldTriggers/ContentChangedTriggerSchema.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; using Squidex.Infrastructure; diff --git a/backend/src/Migrations/RebuildOptions.cs b/backend/src/Migrations/RebuildOptions.cs index 345d3808f..efa313840 100644 --- a/backend/src/Migrations/RebuildOptions.cs +++ b/backend/src/Migrations/RebuildOptions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Migrations { public sealed class RebuildOptions diff --git a/backend/src/Migrations/RebuildRunner.cs b/backend/src/Migrations/RebuildRunner.cs index 5a6620103..c2764e37a 100644 --- a/backend/src/Migrations/RebuildRunner.cs +++ b/backend/src/Migrations/RebuildRunner.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Migrations/RebuilderExtensions.cs b/backend/src/Migrations/RebuilderExtensions.cs index ee42014af..19323e785 100644 --- a/backend/src/Migrations/RebuilderExtensions.cs +++ b/backend/src/Migrations/RebuilderExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Entities.Assets.DomainObject; using Squidex.Domain.Apps.Entities.Contents.DomainObject; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs index 0933ff08c..75a3e5fba 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.Contracts; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs index 789393c92..afe05154a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.Contracts; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguageConfigSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguageConfigSurrogate.cs index be1248765..eb17218c4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguageConfigSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguageConfigSurrogate.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguagesConfigSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguagesConfigSurrogate.cs index 46bbc7bda..8c5d869a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguagesConfigSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/LanguagesConfigSurrogate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.Apps.Json diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/RolesSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/RolesSurrogate.cs index 285a4471d..ad244a0ba 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/RolesSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Json/RolesSurrogate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguageConfig.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguageConfig.cs index 059cb43e5..950ed29ee 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguageConfig.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguageConfig.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs index 95f719fff..820968bec 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs index 5ab791868..32eb7efff 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs index 4659bf653..2d1464e35 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs @@ -5,11 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Assets/AssetMetadata.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Assets/AssetMetadata.cs index 77d513721..80b7db170 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Assets/AssetMetadata.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Assets/AssetMetadata.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; using Squidex.Infrastructure.Json.Objects; namespace Squidex.Domain.Apps.Core.Assets diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs index 92192d657..a16c25c6d 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs index 758840b1f..9819facf0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.Contents diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs index 909a394b6..c22443b2e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/FlatContentData.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/FlatContentData.cs index 6787d1038..774e9c622 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/FlatContentData.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/FlatContentData.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure.Json.Objects; namespace Squidex.Domain.Apps.Core.Contents diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/ContentFieldDataConverter.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/ContentFieldDataConverter.cs index 5bf956932..8ffe53da1 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/ContentFieldDataConverter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/ContentFieldDataConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Newtonsoft.Json; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Newtonsoft; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowStepSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowStepSurrogate.cs index 9ce083b6d..57de31034 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowStepSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowStepSurrogate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Newtonsoft.Json; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowTransitionSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowTransitionSurrogate.cs index dd3103c9e..da3a6d4df 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowTransitionSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Json/WorkflowTransitionSurrogate.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.Contents.Json diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Status.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Status.cs index a81a09c4f..28430adf0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Status.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Status.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; namespace Squidex.Domain.Apps.Core.Contents diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/StatusTypeConverter.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/StatusTypeConverter.cs index 2659de043..92a563d45 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/StatusTypeConverter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/StatusTypeConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Globalization; @@ -13,24 +12,24 @@ namespace Squidex.Domain.Apps.Core.Contents { public sealed class StatusTypeConverter : TypeConverter { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { return sourceType == typeof(string); } - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) { return destinationType == typeof(string); } - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { return new Status((string)value); } - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type? destinationType) { - return value.ToString()!; + return value?.ToString()!; } } } diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflow.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflow.cs index 0a3b23465..1f59023ef 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflow.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflow.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs index 37be3fcc2..815f1852e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/IFieldPartitioning.cs b/backend/src/Squidex.Domain.Apps.Core.Model/IFieldPartitioning.cs index 4fd5fa3ac..0d11f8f18 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/IFieldPartitioning.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/IFieldPartitioning.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core { public interface IFieldPartitioning diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/InvariantPartitioning.cs b/backend/src/Squidex.Domain.Apps.Core.Model/InvariantPartitioning.cs index 47bc4e6d2..db42a8c96 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/InvariantPartitioning.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/InvariantPartitioning.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core { public sealed class InvariantPartitioning : IFieldPartitioning diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs index e4d29bc3a..76dfc6442 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/PartitioningExtensions.cs b/backend/src/Squidex.Domain.Apps.Core.Model/PartitioningExtensions.cs index bf211b737..a99864256 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/PartitioningExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/PartitioningExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core { public static class PartitioningExtensions diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/EnrichedEvents/EnrichedCommentEvent.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/EnrichedEvents/EnrichedCommentEvent.cs index 6f67ce361..64a739fce 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/EnrichedEvents/EnrichedCommentEvent.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/EnrichedEvents/EnrichedCommentEvent.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Shared.Users; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs index 8dc88d521..5a67c6fa3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.Contracts; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/RuleAction.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/RuleAction.cs index 620bb8b93..724fe4aca 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Rules/RuleAction.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Rules/RuleAction.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; using Squidex.Infrastructure.Validation; namespace Squidex.Domain.Apps.Core.Rules diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs index 47f33d8d4..cc3e2b8bf 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.Contracts; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayFieldProperties.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayFieldProperties.cs index 13c2f79f8..f27288f69 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayFieldProperties.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayFieldProperties.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Collections; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/AssetsFieldProperties.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/AssetsFieldProperties.cs index efd119058..6a7af2ff8 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/AssetsFieldProperties.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/AssetsFieldProperties.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentFieldProperties.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentFieldProperties.cs index cc5e58365..4f102253b 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentFieldProperties.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentFieldProperties.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentsFieldProperties.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentsFieldProperties.cs index 2eced736d..fa9326ba8 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentsFieldProperties.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ComponentsFieldProperties.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs index 58acdcfc4..906a803f0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.Schemas @@ -150,7 +147,7 @@ namespace Squidex.Domain.Apps.Core.Schemas return this; } - if (newField is not T) + if (newField is null) { throw new InvalidOperationException($"Field must be of type {typeof(T)}"); } diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldExtensions.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldExtensions.cs index 6abfa5330..88f8706a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; using NamedIdStatic = Squidex.Infrastructure.NamedId; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldNames.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldNames.cs index 480b3cca7..fc9335b7f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldNames.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldNames.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Collections; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRegistry.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRegistry.cs index 33b89b65a..eaab4e27d 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRegistry.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRegistry.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Reflection; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRules.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRules.cs index ab3cfcd66..65b7963a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRules.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldRules.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Collections; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Fields.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Fields.cs index 07adb5931..51b55095c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Fields.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Fields.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.Schemas { public static class Fields diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/IArrayField.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/IArrayField.cs index 825013f46..4eb6351b5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/IArrayField.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/IArrayField.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core.Schemas { public interface IArrayField : IField diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/FieldSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/FieldSurrogate.cs index dc5d01e4f..bda97b8b7 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/FieldSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/FieldSurrogate.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; - namespace Squidex.Domain.Apps.Core.Schemas.Json { public sealed class FieldSurrogate : IFieldSettings diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/SchemaSurrogate.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/SchemaSurrogate.cs index cf5971bb6..4f821ef0c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/SchemaSurrogate.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Json/SchemaSurrogate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/LocalizedValue.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/LocalizedValue.cs index 00624c014..d56bdc7fe 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/LocalizedValue.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/LocalizedValue.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure.Collections; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs index ca199f81f..f67d1cd77 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.Contracts; namespace Squidex.Domain.Apps.Core.Schemas diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs index 30acf88a3..60742ff14 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.Contracts; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ReferencesFieldProperties.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ReferencesFieldProperties.cs index 558ea1f8c..38d2b72b8 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ReferencesFieldProperties.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ReferencesFieldProperties.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ResolvedComponents.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ResolvedComponents.cs index 8a9afbf8a..cc74c4dd5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ResolvedComponents.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ResolvedComponents.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs index 0783f261f..4534b4be0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.Contracts; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs index 5f80154bf..f38a1ba0f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.Contracts; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs index 4aa1676af..23d03929a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.Contracts; -using System.Linq; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaExtensions.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaExtensions.cs index 32dde83eb..cb3c7c208 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj index 807ea3145..f46c1460f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj @@ -1,7 +1,9 @@  - net5.0 + net6.0 Squidex.Domain.Apps.Core + 10.0 + enable enable @@ -9,14 +11,14 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverterFlat.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverterFlat.cs index 61848db77..f799baa12 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverterFlat.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverterFlat.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/FieldConverters.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/FieldConverters.cs index c8e1523ef..b61ca3e48 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/FieldConverters.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/FieldConverters.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ValueConverters.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ValueConverters.cs index 6750128b0..488375bf5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ValueConverters.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ValueConverters.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.ValidateContent; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs index d87b77bc6..05abd2a3a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Globalization; using NodaTime; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs index 6c7122668..739286115 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SyncHelpers.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SyncHelpers.cs index 456b22521..0f25bdf04 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SyncHelpers.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SyncHelpers.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.EventSynchronization { public static class SyncHelpers diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs index 7db5c4cde..fd4067805 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Text; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs index 10bc6e510..259943cef 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs index 60c2a7177..38215c317 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ValueReferencesConverter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ValueReferencesConverter.cs index 26302ffcd..aebd210db 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ValueReferencesConverter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ValueReferencesConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.ConvertContent; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs index e363f5afe..5bcb4d7fe 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.OData.Edm; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmTypeVisitor.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmTypeVisitor.cs index 4f5e2ca49..ed39c38ff 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmTypeVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmTypeVisitor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Microsoft.OData.Edm; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs index 903c4895b..e46a2369d 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs @@ -6,7 +6,6 @@ // ========================================================================== using System.Collections.ObjectModel; -using System.Linq; using NJsonSchema; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EditorAttribute.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EditorAttribute.cs index 687437b96..e5cb10ad5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EditorAttribute.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EditorAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.HandleRules { [AttributeUsage(AttributeTargets.Property)] diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs index 08e332756..fe0adac40 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventJsonSchemaGenerator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventJsonSchemaGenerator.cs index ad9c68637..506e52010 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventJsonSchemaGenerator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventJsonSchemaGenerator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NJsonSchema; using NJsonSchema.Generation; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Extensions/EventJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Extensions/EventJintExtension.cs index 5589edf3c..f118e6e94 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Extensions/EventJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Extensions/EventJintExtension.cs @@ -22,7 +22,7 @@ namespace Squidex.Domain.Apps.Core.HandleRules.Extensions this.urlGenerator = urlGenerator; } - public void Extend(ExecutionContext context) + public void Extend(ScriptExecutionContext context) { context.Engine.SetValue("contentAction", new EventDelegate(() => { diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/FormattableAttribute.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/FormattableAttribute.cs index 296dcb840..48ab9474c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/FormattableAttribute.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/FormattableAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.HandleRules { [AttributeUsage(AttributeTargets.Property)] diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IEventEnricher.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IEventEnricher.cs index c803844bc..32c5b9ce5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IEventEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IEventEnricher.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleActionHandler.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleActionHandler.cs index f38a3d860..7386b925a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleActionHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleEventFormatter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleEventFormatter.cs index 8fc4762de..c897483cb 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleEventFormatter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleEventFormatter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; namespace Squidex.Domain.Apps.Core.HandleRules diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleService.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleService.cs index 51d1ce036..c11c348b0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleService.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleTriggerHandler.cs index f6ce861ac..bff3ef8a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/IRuleTriggerHandler.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/JobResult.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/JobResult.cs index 68169f059..ed7cbb23a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/JobResult.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/JobResult.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/PredefinedPatternsFormatter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/PredefinedPatternsFormatter.cs index 040f5f484..d62ff07d0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/PredefinedPatternsFormatter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/PredefinedPatternsFormatter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Shared.Identity; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Result.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Result.cs index dc33e7143..4335f45a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Result.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Result.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using System.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionAttribute.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionAttribute.cs index 6639b7ac0..9ebc0500e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionAttribute.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.HandleRules { [AttributeUsage(AttributeTargets.Class, Inherited = false)] diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionDefinition.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionDefinition.cs index f152b2436..638ae4e4c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionDefinition.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionDefinition.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core.HandleRules { public sealed class RuleActionDefinition diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs index 1233f7f39..7f5ac7c90 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs index 2d0477228..9dae6eb77 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.HandleRules diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs index de8de3cc1..a55bf3377 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs @@ -5,13 +5,9 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using Newtonsoft.Json; using NodaTime.Text; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleRegistry.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleRegistry.cs index c676d6ee0..24f18849f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleRegistry.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleRegistry.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; using System.Reflection; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs index 8351728f1..fe45a5584 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using NodaTime; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleVariable.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleVariable.cs index 900ea396f..821edc68e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleVariable.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleVariable.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Reflection; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/SkipReason.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/SkipReason.cs index fdce6b5b7..d1b664131 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/SkipReason.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/SkipReason.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Core.HandleRules { [Flags] diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentDataObject.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentDataObject.cs index 4771700b3..9c37463e4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentDataObject.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentDataObject.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Jint; using Jint.Native; using Jint.Native.Object; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentFieldObject.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentFieldObject.cs index 8718e2a9f..a300d411a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentFieldObject.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/ContentFieldObject.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Jint; using Jint.Native; using Jint.Native.Object; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/JsonMapper.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/JsonMapper.cs index ade8c19fc..ced88687c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/JsonMapper.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ContentWrapper/JsonMapper.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using Jint; using Jint.Native; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/DefaultConverter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/DefaultConverter.cs index e97a2af35..de126dff3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/DefaultConverter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/DefaultConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; using System.Security.Claims; using Jint; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/DateTimeJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/DateTimeJintExtension.cs index 3fb706c00..d31c4b345 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/DateTimeJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/DateTimeJintExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using Jint; using Jint.Native; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpJintExtension.cs index 9c7c07578..6c9bafc77 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpJintExtension.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Net.Http; using System.Text; -using System.Threading.Tasks; using Jint; using Jint.Native; using Jint.Native.Json; @@ -28,7 +25,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions this.httpClientFactory = httpClientFactory; } - public void ExtendAsync(ExecutionContext context) + public void ExtendAsync(ScriptExecutionContext context) { AddMethod(context, HttpMethod.Get, "getJSON"); AddMethod(context, HttpMethod.Delete, "deleteJSON"); @@ -38,7 +35,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions AdBodyMethod(context, HttpMethod.Put, "putJSON"); } - private void AddMethod(ExecutionContext context, HttpMethod method, string name) + private void AddMethod(ScriptExecutionContext context, HttpMethod method, string name) { var action = new HttpJson((url, callback, headers) => { @@ -48,7 +45,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions context.Engine.SetValue(name, action); } - private void AdBodyMethod(ExecutionContext context, HttpMethod method, string name) + private void AdBodyMethod(ScriptExecutionContext context, HttpMethod method, string name) { var action = new HttpJsonWithBody((url, body, callback, headers) => { @@ -58,7 +55,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions context.Engine.SetValue(name, action); } - private async Task RequestAsync(ExecutionContext context, HttpMethod method, string url, JsValue? body, Action callback, JsValue? headers) + private async Task RequestAsync(ScriptExecutionContext context, HttpMethod method, string url, JsValue? body, Action callback, JsValue? headers) { if (callback == null) { @@ -99,7 +96,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions } } - private static HttpRequestMessage CreateRequest(ExecutionContext context, HttpMethod method, Uri uri, JsValue? body, JsValue? headers) + private static HttpRequestMessage CreateRequest(ScriptExecutionContext context, HttpMethod method, Uri uri, JsValue? body, JsValue? headers) { var request = new HttpRequestMessage(method, uri); @@ -135,7 +132,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions return request; } - private static async Task ParseResponse(ExecutionContext context, HttpResponseMessage response) + private static async Task ParseResponse(ScriptExecutionContext context, HttpResponseMessage response) { var responseString = await response.Content.ReadAsStringAsync(context.CancellationToken); diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringJintExtension.cs index c2ec4a72a..41ad1fa8d 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringJintExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Jint; using Jint.Native; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringWordsJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringWordsJintExtension.cs index c4679e49f..35a6a1dc2 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringWordsJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/StringWordsJintExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Jint; using Jint.Native; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IJintExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IJintExtension.cs index 4737551b3..cffe00e12 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IJintExtension.cs @@ -15,11 +15,11 @@ namespace Squidex.Domain.Apps.Core.Scripting { } - void Extend(ExecutionContext context) + void Extend(ScriptExecutionContext context) { } - void ExtendAsync(ExecutionContext context) + void ExtendAsync(ScriptExecutionContext context) { } } diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IScriptEngine.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IScriptEngine.cs index 0f2fe16a5..6db8031d2 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IScriptEngine.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/IScriptEngine.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs index 7c6e2ccc5..b0f1c5612 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Esprima; using Esprima.Ast; using Microsoft.Extensions.Caching.Memory; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs index 25e5398e2..9b5056582 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Esprima; using Jint; using Jint.Native; @@ -179,7 +174,7 @@ namespace Squidex.Domain.Apps.Core.Scripting return JsonMapper.Map(context.Engine.GetCompletionValue()); } - private ExecutionContext CreateEngine(ScriptOptions options) + private ScriptExecutionContext CreateEngine(ScriptOptions options) { var engine = new Engine(engineOptions => { @@ -204,7 +199,7 @@ namespace Squidex.Domain.Apps.Core.Scripting extension.Extend(engine); } - var context = new ExecutionContext(engine); + var context = new ScriptExecutionContext(engine); return context; } diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintUser.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintUser.cs index 9a75925c2..a41f476a4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintUser.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintUser.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; using Jint; using Jint.Native; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs index cde181bac..92f4eb0f8 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ExecutionContext.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs similarity index 84% rename from backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ExecutionContext.cs rename to backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs index 102227952..b80616eb6 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ExecutionContext.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; using Jint; using Jint.Native; using Jint.Native.Object; @@ -15,7 +12,7 @@ using Squidex.Text; namespace Squidex.Domain.Apps.Core.Scripting { - public sealed class ExecutionContext : ScriptContext + public sealed class ScriptExecutionContext : ScriptContext { private Func? completion; @@ -25,7 +22,7 @@ namespace Squidex.Domain.Apps.Core.Scripting public bool IsAsync { get; private set; } - internal ExecutionContext(Engine engine) + internal ScriptExecutionContext(Engine engine) { Engine = engine; } @@ -40,7 +37,7 @@ namespace Squidex.Domain.Apps.Core.Scripting completion?.Invoke(exception); } - public ExecutionContext ExtendAsync(IEnumerable extensions, Func completion, + public ScriptExecutionContext ExtendAsync(IEnumerable extensions, Func completion, CancellationToken ct) { CancellationToken = ct; @@ -55,7 +52,7 @@ namespace Squidex.Domain.Apps.Core.Scripting return this; } - public ExecutionContext Extend(IEnumerable extensions) + public ScriptExecutionContext Extend(IEnumerable extensions) { foreach (var extension in extensions) { @@ -65,7 +62,7 @@ namespace Squidex.Domain.Apps.Core.Scripting return this; } - public ExecutionContext Extend(ScriptVars vars, ScriptOptions options) + public ScriptExecutionContext Extend(ScriptVars vars, ScriptOptions options) { var engine = Engine; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj index 22d2c0f61..42bd84ba2 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Domain.Apps.Core - 9.0 + 10.0 + enable enable @@ -18,17 +19,17 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/ITagService.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/ITagService.cs index 23ca927d1..86fdb9827 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/ITagService.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/ITagService.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.Tags diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs index ae1294bcb..bf9c90ea6 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs index 61a53b6cf..677503694 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core.Tags { public class TagsExport diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsSet.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsSet.cs index 8e87ee8ab..ea849e469 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsSet.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsSet.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core.Tags { public sealed class TagsSet : Dictionary diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/DateTimeFluidExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/DateTimeFluidExtension.cs index dc1f64e88..9902e70d8 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/DateTimeFluidExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/DateTimeFluidExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using Fluid; using Fluid.Values; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/JsonArrayFluidValue.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/JsonArrayFluidValue.cs index 73aff2197..b3af342b6 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/JsonArrayFluidValue.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/JsonArrayFluidValue.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Globalization; -using System.IO; using System.Text.Encodings.Web; using Fluid; using Fluid.Values; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/UserFluidExtension.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/UserFluidExtension.cs index a246dcff2..417ae09ae 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/UserFluidExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/Extensions/UserFluidExtension.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Fluid; using Fluid.Values; using Squidex.Shared.Identity; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/FluidTemplateEngine.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/FluidTemplateEngine.cs index 0b630e123..6943fe9d3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/FluidTemplateEngine.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/FluidTemplateEngine.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Fluid; using Fluid.Values; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/ITemplateEngine.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/ITemplateEngine.cs index 5742f4690..e2c6c805b 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/ITemplateEngine.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/ITemplateEngine.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Core.Templates { public interface ITemplateEngine diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateParseException.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateParseException.cs index 071624eb0..26041f292 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateParseException.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateParseException.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.Serialization; using System.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateVars.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateVars.cs index ea6e5bee1..1510e72bb 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateVars.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Templates/TemplateVars.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Core.Templates { public sealed class TemplateVars : Dictionary diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs index 3e23a4bb5..6e8df7af9 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs @@ -6,9 +6,6 @@ // ========================================================================== using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.ValidateContent.Validators; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs index 937ada2bc..830adf0f3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.ValidateContent.Validators; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs index 50ee2ecdd..8f5b55f50 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.ValidateContent.Validators; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidator.cs index 1bf6769de..090f145de 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Core.ValidateContent { public delegate void AddError(IEnumerable path, string message); diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidatorsFactory.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidatorsFactory.cs index 9666ea7e0..0f0faef63 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidatorsFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/IValidatorsFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Schemas; namespace Squidex.Domain.Apps.Core.ValidateContent diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/JsonValueConverter.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/JsonValueConverter.cs index bc056dc30..caf561386 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/JsonValueConverter.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/JsonValueConverter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using NodaTime.Text; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ObjectPath.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ObjectPath.cs index d8b735b69..e42fd5925 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ObjectPath.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ObjectPath.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Text; namespace Squidex.Domain.Apps.Core.ValidateContent diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs index 46ab18845..26bde2390 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Immutable; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs index ccfa5749e..c37c99399 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; using Squidex.Log; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs index a5e8a9c16..6b0de6ec2 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs index 1363f4940..c09985f2a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.Immutable; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs index 9836d1e03..9007c45c5 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs @@ -6,8 +6,6 @@ // ========================================================================== using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs index 25023420b..be6952ed3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ComponentValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ComponentValidator.cs index ec5bec2cc..d567bb8c3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ComponentValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ComponentValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs index 5d7341621..798d0921e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs index 99e0feea8..108195af0 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs index 570f63634..d01fd51d4 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs index c44a61779..55887b951 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Text.RegularExpressions; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs index 032b7fdf9..be6b8a91e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs index 74a49efcd..fd913207f 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs index 0d11a3f5c..31914f6cb 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs index f3fb247b0..fa675f77b 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs index ba8efa412..44a0c817b 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs index 0213ec5b5..1e27bb4fb 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs index b7f50e871..f3347a29c 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs index d60f222dc..5df1f9c9a 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs index d4857ab7f..344dc347d 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Infrastructure.Translations; namespace Squidex.Domain.Apps.Core.ValidateContent.Validators diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/AdaptIdVisitor.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/AdaptIdVisitor.cs index ba0ec1f6b..c1b023cfd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/AdaptIdVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/AdaptIdVisitor.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using NodaTime; using Squidex.Infrastructure; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppEntity.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppEntity.cs index f511bd7ea..fd4e70d67 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppEntity.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using MongoDB.Bson.Serialization.Attributes; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppRepository.cs index a8424ac71..35deaf4a5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Apps/MongoAppRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Newtonsoft.Json; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetEntity.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetEntity.cs index 5c4f09502..70b45ba0a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetEntity.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using MongoDB.Bson.Serialization.Attributes; using NodaTime; using Squidex.Domain.Apps.Core.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository.cs index 90a5c85de..02ccb6d34 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets.Repositories; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository_SnapshotStore.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository_SnapshotStore.cs index 276fb1e91..c66e76618 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetFolderRepository_SnapshotStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository.cs index 8382da768..c91f0c77a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets.Repositories; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository_SnapshotStore.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository_SnapshotStore.cs index bf5709757..dde8cdd60 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/MongoAssetRepository_SnapshotStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FindExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FindExtensions.cs index cf40963ed..7cfb20942 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FindExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FindExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using MongoDB.Driver; using Squidex.Infrastructure; using Squidex.Infrastructure.MongoDb.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FirstPascalPathExtension.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FirstPascalPathExtension.cs index 0b5ea499a..891e36db6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FirstPascalPathExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Assets/Visitors/FirstPascalPathExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Infrastructure.Queries; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs index 6dd20687b..778caa228 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentEntity.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentEntity.cs index 6f9463780..78e244bf6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentEntity.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using MongoDB.Bson.Serialization.Attributes; using NodaTime; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs index 9d588382d..121f8cbd6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository_SnapshotStore.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository_SnapshotStore.cs index 018bbc4b9..e2100513a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository_SnapshotStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.ExtractReferenceIds; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Adapt.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Adapt.cs index d3bf8837e..a17d26aeb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Adapt.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Adapt.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using MongoDB.Bson.Serialization; using Squidex.Domain.Apps.Core.GenerateEdmSchema; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/AdaptionVisitor.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/AdaptionVisitor.cs index 2b01b7ee1..553cac179 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/AdaptionVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/AdaptionVisitor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs index f48293e7b..055b19d9f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/OperationBase.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/OperationBase.cs index d34a78630..7c5321a40 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/OperationBase.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/OperationBase.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using MongoDB.Driver; namespace Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryAsStream.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryAsStream.cs index ac2a0106e..15c5c6f0f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryAsStream.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryAsStream.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryById.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryById.cs index 0a9be2ce4..89fcb6dd8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryById.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryById.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByIds.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByIds.cs index 42f67bfc6..671997771 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByIds.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByIds.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByQuery.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByQuery.cs index c4cb3a9c2..785064444 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByQuery.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByQuery.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferences.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferences.cs index 2f9bbdb41..825f72475 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferences.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferences.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferrers.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferrers.cs index af19460fa..b13ef1ad8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferrers.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryReferrers.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Infrastructure; using Squidex.Infrastructure.MongoDb; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduled.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduled.cs index 364e1078f..d0257c901 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduled.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduled.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Domain.Apps.Entities.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/History/MongoHistoryEventRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/History/MongoHistoryEventRepository.cs index fd7e63b28..1c78b31fe 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/History/MongoHistoryEventRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/History/MongoHistoryEventRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs index b0975ba20..93cba3ba2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleRepository.cs index 87670b87e..2da66b875 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Newtonsoft.Json; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleStatisticsCollection.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleStatisticsCollection.cs index 0333faaab..1e43fbec9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleStatisticsCollection.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleStatisticsCollection.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization; using MongoDB.Driver; using NodaTime; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemaRepository.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemaRepository.cs index 0ddcebd38..ae82af437 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemaRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemaRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Newtonsoft.Json; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHash.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHash.cs index 96668bdad..900eebd37 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHash.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHash.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHashEntity.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHashEntity.cs index 862d40dd7..9c8804e9c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHashEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Schemas/MongoSchemasHashEntity.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using MongoDB.Bson.Serialization.Attributes; using NodaTime; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj index a7651a3cc..8fa28292e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -17,13 +18,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasIndexDefinition.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasIndexDefinition.cs index 55863de29..7c30ace89 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasIndexDefinition.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasIndexDefinition.cs @@ -5,13 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Net.Http; using System.Net.Http.Json; -using System.Threading; -using System.Threading.Tasks; using Squidex.Hosting.Configuration; namespace Squidex.Domain.Apps.Entities.MongoDb.Text diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasTextIndex.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasTextIndex.cs index 2ee252e02..fe59c57f3 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasTextIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/AtlasTextIndex.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Lucene.Net.Analysis.Standard; using Lucene.Net.Analysis.Util; using Lucene.Net.Util; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/CommandFactory.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/CommandFactory.cs index 0eed3d4ed..8835f10eb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/CommandFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/CommandFactory.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Contents.Text; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneQueryVisitor.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneQueryVisitor.cs index d7892e07a..d5c66c5dd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneQueryVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneQueryVisitor.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Linq; using System.Text; using Lucene.Net.Index; using Lucene.Net.Search; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneSearchDefinitionExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneSearchDefinitionExtensions.cs index 4776fb556..a369c91ee 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneSearchDefinitionExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/LuceneSearchDefinitionExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson; using MongoDB.Bson.Serialization; using MongoDB.Driver; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndex.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndex.cs index 5cf2c0204..bbf50906c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndex.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; namespace Squidex.Domain.Apps.Entities.MongoDb.Text diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexBase.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexBase.cs index 757ac7946..c5c9a52f6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexBase.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexBase.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexerState.cs b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexerState.cs index 68a3ee302..b161069dc 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexerState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Text/MongoTextIndexerState.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson.Serialization; using MongoDB.Driver; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs b/backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs index 8470b919e..767a80845 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Caching; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps.Indexes; diff --git a/backend/src/Squidex.Domain.Apps.Entities/AppTag.cs b/backend/src/Squidex.Domain.Apps.Entities/AppTag.cs index 5e8a5cca3..cad116cfa 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/AppTag.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/AppTag.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Fluid.Tags; using Microsoft.Extensions.DependencyInjection; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppEventDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppEventDeleter.cs index 7cc36d7cb..f5afaea46 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppEventDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppEventDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Domain.Apps.Entities.Apps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppHistoryEventsCreator.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppHistoryEventsCreator.cs index 2420ada4c..c024bc7c8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppHistoryEventsCreator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppHistoryEventsCreator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.History; using Squidex.Domain.Apps.Events.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppPermanentDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppPermanentDeleter.cs index a7a91ed42..aa24dfd7c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppPermanentDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppPermanentDeleter.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Events.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs index 117c3a2d1..cd73fa7d8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Entities.Search; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs index 83c01b316..d5fa3ab50 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs index d383e9fa1..aee96993d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUsageDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUsageDeleter.cs index 71eb6ff64..35eb09680 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUsageDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/AppUsageDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.UsageTracking; namespace Squidex.Domain.Apps.Entities.Apps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs index 52d7accb0..33cc63b78 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Apps.DomainObject; using Squidex.Domain.Apps.Entities.Apps.Indexes; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs index 4c9a23fa1..5e609c89e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs index 0b12fafc0..b1b037c68 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs @@ -5,13 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.IO; using System.Text; -using System.Threading; -using System.Threading.Tasks; using CsvHelper; using CsvHelper.Configuration; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs index 360b3adce..a218c2436 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; using Orleans; using Squidex.Domain.Apps.Entities.Apps.Indexes; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppCommandMiddleware.cs index 8579a7a5f..e224442bf 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Apps.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs index f85209f44..db3ae23ca 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.cs index a8336fef1..3cc77d6d6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.DomainObject.Guards; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObjectGrain.cs index e50af86ed..b9ac89e84 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppContributors.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppContributors.cs index 0645c861e..f075c46b8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppContributors.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppContributors.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Plans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppRoles.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppRoles.cs index 3aeb5e8db..026c28e18 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppRoles.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/Guards/GuardAppRoles.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/IAppGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/IAppGrain.cs index 49c81b351..4a3873ada 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/IAppGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/IAppGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppImageStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppImageStore.cs index d72bfd4ef..581820f1b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppImageStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppImageStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppLogStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppLogStore.cs index 4659796ff..7a02396f4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppLogStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppLogStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettings.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettings.cs index 4172a1403..7e2f63448 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettings.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettings.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettingsGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettingsGrain.cs index d33381bc5..6007f0b7c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettingsGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/IAppUISettingsGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsCacheGrain.cs index 001b2f7cc..1da1adce0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsCacheGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Orleans.Concurrency; using Squidex.Domain.Apps.Entities.Apps.Repositories; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs index f4dad2476..d4c10a566 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Caching; using Squidex.Domain.Apps.Entities.Apps.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsCacheGrain.cs index c0a769d10..b4d095346 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsCacheGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans.Indexes; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsIndex.cs index 309c6749e..15cb5163b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/IAppsIndex.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs index 9b60f4ec9..2822eb2f5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Entities.Notifications; using Squidex.Domain.Apps.Events.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs index 9d2653d7f..8a0e089aa 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs index e55ade93c..b5e1ab7d2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps.Plans diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlanBillingManager.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlanBillingManager.cs index 790ff9ace..7975a2638 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlanBillingManager.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlanBillingManager.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps.Plans diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlansProvider.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlansProvider.cs index 6c860929c..1875d9cd7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlansProvider.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IAppPlansProvider.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities.Apps.Plans { public interface IAppPlansProvider diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IUsageNotifierGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IUsageNotifierGrain.cs index 1dde6db2f..3e41443df 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IUsageNotifierGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/IUsageNotifierGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Orleans.Concurrency; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/NoopAppPlanBillingManager.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/NoopAppPlanBillingManager.cs index f4a5c5819..bd60a7af1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/NoopAppPlanBillingManager.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/NoopAppPlanBillingManager.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps.Plans diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs index e9672bc65..e91a5c05f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps.Plans diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RestrictAppsCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RestrictAppsCommandMiddleware.cs index 5ee6eeb38..0f7431b0a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RestrictAppsCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RestrictAppsCommandMiddleware.cs @@ -6,7 +6,6 @@ // ========================================================================== using System.Globalization; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs index 2975b9c37..28e44d3a6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs index 2e0e480a0..03991ea0a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Entities.Notifications; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Repositories/IAppRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Repositories/IAppRepository.cs index 5e0057f14..8ee67036a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Repositories/IAppRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Repositories/IAppRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Apps.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs index 39546cd39..0a0cc08b3 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Threading.Tasks; using Squidex.Infrastructure.Security; using Squidex.Shared; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/AlwaysCreateClientCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/AlwaysCreateClientCommandMiddleware.cs index 3b777549e..97f8a5de7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/AlwaysCreateClientCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/AlwaysCreateClientCommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/ArrayFieldBuilder.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/ArrayFieldBuilder.cs index ae0688bc7..06ce93aa1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/ArrayFieldBuilder.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/ArrayFieldBuilder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/FieldBuilder.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/FieldBuilder.cs index 23e04a59f..8100c5d5a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/FieldBuilder.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/FieldBuilder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/SchemaBuilder.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/SchemaBuilder.cs index 140d0b51f..e0764e894 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/SchemaBuilder.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/Builders/SchemaBuilder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Text; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateBlog.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateBlog.cs index 56cf297d7..086ab0a19 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateBlog.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateBlog.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Apps.Templates.Builders; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateProfile.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateProfile.cs index 83ab7f9e1..e05e21e94 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateProfile.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/CreateProfile.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/ITemplate.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/ITemplate.cs index da645065f..4ed946563 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/ITemplate.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/ITemplate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Apps.Templates { public interface ITemplate diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs index eaa637d13..ac91b4c1a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs index e833e5ef5..3d3b45b98 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetEntity.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetEntity.cs index 5672d8e52..504c0fd00 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetEntity.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using NodaTime; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetExtensions.cs index 6e839fa66..93952dc91 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetExtensions.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Text; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.ObjectPool; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetHistoryEventsCreator.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetHistoryEventsCreator.cs index 37cb6bab3..cc2d111eb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetHistoryEventsCreator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetHistoryEventsCreator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.History; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetOptions.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetOptions.cs index 89807945b..fe22f495a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetOptions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetOptions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Entities.Assets { public sealed class AssetOptions diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetPermanentDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetPermanentDeleter.cs index 1071f13a9..38ffe979a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetPermanentDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetPermanentDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetSlug.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetSlug.cs index 36783f9c6..340166e03 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetSlug.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetSlug.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Text; namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetStats.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetStats.cs index f8c157d8b..cfc128dfd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetStats.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetStats.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetTagsDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetTagsDeleter.cs index 31e406a33..e73f59b2d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetTagsDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetTagsDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Tags; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker.cs index c2b43bec1..2fc6df82f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; using Squidex.Infrastructure.UsageTracking; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker_EventHandling.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker_EventHandling.cs index 43f26d5b2..30fa34f3d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker_EventHandling.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetUsageTracker_EventHandling.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsFluidExtension.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsFluidExtension.cs index 8240a23ca..f01c35327 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsFluidExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsFluidExtension.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using System.Text.Encodings.Web; -using System.Threading.Tasks; using Fluid; using Fluid.Ast; using Fluid.Values; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsJintExtension.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsJintExtension.cs index c67b1d394..d0dc654b5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsJintExtension.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Jint.Native; using Jint.Runtime; using Jint.Runtime.Interop; @@ -33,13 +29,13 @@ namespace Squidex.Domain.Apps.Entities.Assets this.serviceProvider = serviceProvider; } - public void ExtendAsync(ExecutionContext context) + public void ExtendAsync(ScriptExecutionContext context) { AddAssetText(context); AddAsset(context); } - private void AddAsset(ExecutionContext context) + private void AddAsset(ScriptExecutionContext context) { if (!context.TryGetValue("appId", out var appId)) { @@ -57,19 +53,19 @@ namespace Squidex.Domain.Apps.Entities.Assets context.Engine.SetValue("getAssets", action); } - private void AddAssetText(ExecutionContext context) + private void AddAssetText(ScriptExecutionContext context) { var action = new GetAssetTextDelegate((references, callback, encoding) => GetText(context, references, callback, encoding)); context.Engine.SetValue("getAssetText", action); } - private void GetText(ExecutionContext context, JsValue input, Action callback, JsValue encoding) + private void GetText(ScriptExecutionContext context, JsValue input, Action callback, JsValue encoding) { GetTextAsync(context, input, callback, encoding).Forget(); } - private async Task GetTextAsync(ExecutionContext context, JsValue input, Action callback, JsValue encoding) + private async Task GetTextAsync(ScriptExecutionContext context, JsValue input, Action callback, JsValue encoding) { Guard.NotNull(callback, nameof(callback)); @@ -117,12 +113,12 @@ namespace Squidex.Domain.Apps.Entities.Assets callback(JsValue.FromObject(context.Engine, "ErrorNoAsset")); } - private void GetAssets(ExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) + private void GetAssets(ScriptExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) { GetReferencesAsync(context, appId, user, references, callback).Forget(); } - private async Task GetReferencesAsync(ExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) + private async Task GetReferencesAsync(ScriptExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) { Guard.NotNull(callback, nameof(callback)); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsSearchSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsSearchSource.cs index 234194999..4edc71b93 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsSearchSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/AssetsSearchSource.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Search; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/BackupAssets.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/BackupAssets.cs index 5b7d1882d..259a78802 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/BackupAssets.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/BackupAssets.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Core.Tags; using Squidex.Domain.Apps.Entities.Assets.DomainObject; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/AnnotateAsset.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/AnnotateAsset.cs index 838564730..40d8e5a21 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/AnnotateAsset.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/AnnotateAsset.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; namespace Squidex.Domain.Apps.Entities.Assets.Commands diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/BulkUpdateJob.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/BulkUpdateJob.cs index d7ac65131..a0e067c88 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/BulkUpdateJob.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/BulkUpdateJob.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/UploadAssetCommand.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/UploadAssetCommand.cs index 744a0b35e..43f5e9b45 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/UploadAssetCommand.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Commands/UploadAssetCommand.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Assets; using Squidex.Domain.Apps.Core.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DefaultAssetFileStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DefaultAssetFileStore.cs index ef023da30..8769f9d22 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DefaultAssetFileStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DefaultAssetFileStore.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetCommandMiddleware.cs index 12d9ea947..681405f78 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetCommandMiddleware.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Security.Cryptography; -using System.Threading.Tasks; using Orleans; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.State.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.State.cs index 47035675c..b6b16c0d8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.State.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.State.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Runtime.Serialization; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Events.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.cs index cee7ed964..c95a3f0ed 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObject.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Domain.Apps.Entities.Assets.DomainObject.Guards; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObjectGrain.cs index 3a34c0070..2603bef42 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObject.cs index 1e45dcae2..366cef1ce 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObject.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Domain.Apps.Entities.Assets.DomainObject.Guards; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObjectGrain.cs index bafa3d984..48c0b518f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderOperation.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderOperation.cs index 707becde5..af51adef0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderOperation.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetFolderOperation.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetOperation.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetOperation.cs index 24e3ddf72..405d8a812 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetOperation.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetOperation.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetsBulkUpdateCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetsBulkUpdateCommandMiddleware.cs index 849a40811..59c1f1be2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetsBulkUpdateCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/AssetsBulkUpdateCommandMiddleware.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Domain.Apps.Entities.Contents; @@ -15,6 +13,7 @@ using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Tasks; +using Squidex.Log; using Squidex.Shared; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter @@ -25,6 +24,7 @@ namespace Squidex.Domain.Apps.Entities.Assets.DomainObject public sealed class AssetsBulkUpdateCommandMiddleware : ICommandMiddleware { private readonly IContextProvider contextProvider; + private readonly ISemanticLog log; private sealed record BulkTaskCommand(BulkTask Task, DomainId Id, ICommand Command) { @@ -40,9 +40,10 @@ namespace Squidex.Domain.Apps.Entities.Assets.DomainObject { } - public AssetsBulkUpdateCommandMiddleware(IContextProvider contextProvider) + public AssetsBulkUpdateCommandMiddleware(IContextProvider contextProvider, ISemanticLog log) { this.contextProvider = contextProvider; + this.log = log; } public async Task HandleAsync(CommandContext context, NextDelegate next) @@ -127,7 +128,7 @@ namespace Squidex.Domain.Apps.Entities.Assets.DomainObject } } - private static async Task ExecuteCommandAsync(BulkTaskCommand bulkCommand) + private async Task ExecuteCommandAsync(BulkTaskCommand bulkCommand) { var (task, id, command) = bulkCommand; try @@ -138,6 +139,12 @@ namespace Squidex.Domain.Apps.Entities.Assets.DomainObject } catch (Exception ex) { + log.LogError(ex, w => w + .WriteProperty("action", "BulkContent") + .WriteProperty("status", "Failed") + .WriteProperty("jobIndex", task.JobIndex) + .WriteProperty("jobType", task.CommandJob.Type.ToString())); + task.Results.Add(new BulkUpdateResultItem(id, task.JobIndex, ex)); } } @@ -156,6 +163,12 @@ namespace Squidex.Domain.Apps.Entities.Assets.DomainObject } catch (Exception ex) { + log.LogError(ex, w => w + .WriteProperty("action", "BulkContent") + .WriteProperty("status", "Failed") + .WriteProperty("jobIndex", task.JobIndex) + .WriteProperty("jobType", task.CommandJob.Type.ToString())); + task.Results.Add(new BulkUpdateResultItem(id, task.JobIndex, ex)); return null; } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptMetadataWrapper.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptMetadataWrapper.cs index 78401bc50..f316b9409 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptMetadataWrapper.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptMetadataWrapper.cs @@ -6,9 +6,7 @@ // ========================================================================== using System.Collections; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptingExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptingExtensions.cs index 3a27c8cf2..9e9a93fd8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptingExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ScriptingExtensions.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Scripting; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/TagsExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/TagsExtensions.cs index bf3ad8c55..75270ce16 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/TagsExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/TagsExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Tags; namespace Squidex.Domain.Apps.Entities.Assets.DomainObject.Guards diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ValidationExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ValidationExtensions.cs index bea4ea81e..86c2a455d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ValidationExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/Guards/ValidationExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Domain.Apps.Entities.Contents.Repositories; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/IAssetGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/IAssetGrain.cs index d1ff58e2c..23808a534 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/IAssetGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/DomainObject/IAssetGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTagAssetMetadataSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTagAssetMetadataSource.cs index 7a51abf40..23b465a05 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTagAssetMetadataSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTagAssetMetadataSource.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTypeAssetMetadataSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTypeAssetMetadataSource.cs index bf58ff122..3eb8a34a5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTypeAssetMetadataSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/FileTypeAssetMetadataSource.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetEnricher.cs index 17a9ff463..6aac50ca0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetEnricher.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Assets { public interface IAssetEnricher diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetFileStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetFileStore.cs index ab287ab4b..1c02e015f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetFileStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetFileStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetLoader.cs index 3dd0d28a5..2a28f9009 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetMetadataSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetMetadataSource.cs index de572c2f2..c6e694485 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetMetadataSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetMetadataSource.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetQueryService.cs index 92190db7a..21a4caf06 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetQueryService.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetUsageTracker.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetUsageTracker.cs index c44c8092c..6d1116128 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetUsageTracker.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IAssetUsageTracker.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Assets diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/IEnrichedAssetEntity.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/IEnrichedAssetEntity.cs index 8f1daa520..a37a0bb88 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/IEnrichedAssetEntity.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/IEnrichedAssetEntity.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities.Assets { public interface IEnrichedAssetEntity : IAssetEntity diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/ImageAssetMetadataSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/ImageAssetMetadataSource.cs index 0fa544680..5fbdd97c2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/ImageAssetMetadataSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/ImageAssetMetadataSource.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetEnricher.cs index 6418378ec..10342a949 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetEnricher.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Tags; using Squidex.Infrastructure; using Squidex.Infrastructure.Caching; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetLoader.cs index d4ae955f5..d5eaca83e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Assets.DomainObject; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryParser.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryParser.cs index a550493ab..83e593b6c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryParser.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryParser.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Microsoft.OData; using Microsoft.OData.Edm; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryService.cs index fd949b5b8..5c56c2371 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/AssetQueryService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Entities.Assets.Repositories; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/FilterTagTransformer.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/FilterTagTransformer.cs index 9d0a483f9..8325a9924 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/FilterTagTransformer.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Queries/FilterTagTransformer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Tags; using Squidex.Infrastructure; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/RebuildFiles.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/RebuildFiles.cs index d26e597d8..c2aea3601 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/RebuildFiles.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/RebuildFiles.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Domain.Apps.Events.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/RecursiveDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/RecursiveDeleter.cs index 44f28e1ef..a12f674fe 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/RecursiveDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/RecursiveDeleter.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Domain.Apps.Entities.Assets.Repositories; using Squidex.Domain.Apps.Events.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetFolderRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetFolderRepository.cs index 629da0d65..4e0839a8c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetFolderRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetFolderRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Assets.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetRepository.cs index 0561799b7..f4c3da946 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/Repositories/IAssetRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Assets.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/Assets/SvgAssetMetadataSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Assets/SvgAssetMetadataSource.cs index c088e2e74..03b6d788b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Assets/SvgAssetMetadataSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Assets/SvgAssetMetadataSource.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure.Translations; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupGrain.cs index 3aa220850..18400e19d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupGrain.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using NodaTime; using Orleans.Concurrency; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupReader.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupReader.cs index bf59ebefb..d400bb373 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupReader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupReader.cs @@ -5,12 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; using System.IO.Compression; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Backup.Helpers; using Squidex.Domain.Apps.Entities.Backup.Model; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupRestoreException.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupRestoreException.cs index d6c116a60..6d581493d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupRestoreException.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupRestoreException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupService.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupService.cs index bbde84eb6..e999a77d1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupWriter.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupWriter.cs index 3b8d728a6..c67cf5269 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupWriter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/BackupWriter.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using System.IO.Compression; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Backup.Helpers; using Squidex.Domain.Apps.Entities.Backup.Model; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/CompatibilityExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/CompatibilityExtensions.cs index 4248e331e..c021f954b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/CompatibilityExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/CompatibilityExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Backup { public static class CompatibilityExtensions diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/DefaultBackupArchiveStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/DefaultBackupArchiveStore.cs index 5f2f08d90..77e2b074a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/DefaultBackupArchiveStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/DefaultBackupArchiveStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/Helpers/ArchiveHelper.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/Helpers/ArchiveHelper.cs index 848c90bb2..e194918fe 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/Helpers/ArchiveHelper.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/Helpers/ArchiveHelper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Entities.Backup.Helpers { public static class ArchiveHelper diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveLocation.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveLocation.cs index 4a81cd6a8..724124933 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveLocation.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveLocation.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveStore.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveStore.cs index 495842ebc..8ad5429a3 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveStore.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupArchiveStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupGrain.cs index 3ec798e6f..aa16e0c2f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupHandler.cs index 6ae396a50..5b428c5ab 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupHandler.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupReader.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupReader.cs index 19b54cb1e..8cacccae2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupReader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupReader.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.States; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupService.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupService.cs index 66e5f7b15..df6226fdb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupWriter.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupWriter.cs index 3e26f2c47..eb1a73fb2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupWriter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IBackupWriter.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreGrain.cs index 6e1823066..d384c93ec 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreJob.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreJob.cs index fdd5306d8..2d4410869 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreJob.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/IRestoreJob.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; namespace Squidex.Domain.Apps.Entities.Backup diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs index 848d4d50c..c1cf479cf 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/RestoreGrain.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using Microsoft.Extensions.DependencyInjection; using NodaTime; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/State/BackupState.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/State/BackupState.cs index e39dd0631..b0186b02a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/State/BackupState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/State/BackupState.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities.Backup.State { public sealed class BackupState diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/State/RestoreJob.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/State/RestoreJob.cs index c11d979dd..739730f49 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/State/RestoreJob.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/State/RestoreJob.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/StreamMapper.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/StreamMapper.cs index d74df82de..cab67724e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/StreamMapper.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/StreamMapper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Backup @@ -31,7 +29,7 @@ namespace Squidex.Domain.Apps.Entities.Backup Guard.NotNullOrEmpty(stream, nameof(stream)); var typeIndex = stream.IndexOf("-", StringComparison.Ordinal); - var typeName = stream.Substring(0, typeIndex); + var typeName = stream[..typeIndex]; var id = DomainId.Create(stream[(typeIndex + 1)..]); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs index 5dd7cd98d..1f3de5fa6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/TempFolderBackupArchiveLocation.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Net.Http; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Json; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Backup/UserMapping.cs b/backend/src/Squidex.Domain.Apps.Entities/Backup/UserMapping.cs index fe0ffe5a0..5b7aa1a9c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Backup/UserMapping.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Backup/UserMapping.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Shared.Users; diff --git a/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResult.cs b/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResult.cs index 2a75d0693..03573edfd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResult.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResult.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities { public sealed class BulkUpdateResult : List diff --git a/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResultItem.cs b/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResultItem.cs index 1154efc82..772953732 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResultItem.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/BulkUpdateResultItem.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/Commands/CreateComment.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/Commands/CreateComment.cs index 56ebd3722..b8e1e8d6c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/Commands/CreateComment.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/Commands/CreateComment.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Comments.Commands diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentTriggerHandler.cs index 846aa2ac0..1f80f9f32 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentTriggerHandler.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsLoader.cs index 131b573e3..5d387d4ba 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Comments.DomainObject; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsResult.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsResult.cs index e54465459..c3ef110e6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsResult.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/CommentsResult.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Comments; using Squidex.Domain.Apps.Events.Comments; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsCommandMiddleware.cs index 429e82d12..6d7b7b230 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsCommandMiddleware.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsGrain.cs index 11392f77b..4fdc260bb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/CommentsGrain.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Domain.Apps.Entities.Comments.DomainObject.Guards; using Squidex.Domain.Apps.Events.Comments; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/Guards/GuardComments.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/Guards/GuardComments.cs index 8b5428c12..ebb315863 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/Guards/GuardComments.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/Guards/GuardComments.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Domain.Apps.Events.Comments; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/ICommentsGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/ICommentsGrain.cs index fb78f6111..4dfb46729 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/ICommentsGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/DomainObject/ICommentsGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/GrainWatchingService.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/GrainWatchingService.cs index 6d6bcd017..6b7df3baf 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/GrainWatchingService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/GrainWatchingService.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/ICommentsLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/ICommentsLoader.cs index a6ceb0be9..28a074166 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/ICommentsLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/ICommentsLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Comments diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingGrain.cs index 3b8841df2..fff24d4f6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Domain.Apps.Entities.Comments diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingService.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingService.cs index c88c01405..8c6607eb4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/IWatchingService.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Comments diff --git a/backend/src/Squidex.Domain.Apps.Entities/Comments/WatchingGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Comments/WatchingGrain.cs index 37a241da8..ce0c7a2ac 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Comments/WatchingGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Comments/WatchingGrain.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using NodaTime; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/BackupContents.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/BackupContents.cs index ae720f3e6..2cd20b5bf 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/BackupContents.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/BackupContents.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Backup; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs index fd95ed2ef..99aae395f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentExtensions.cs index 469ff9d7d..eb651eb67 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; using Squidex.Infrastructure.Caching; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentHistoryEventsCreator.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentHistoryEventsCreator.cs index abf24f72c..aa5ac59fc 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentHistoryEventsCreator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentHistoryEventsCreator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.History; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentOptions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentOptions.cs index 4abed69cb..1c9e926fd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentOptions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentOptions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Domain.Apps.Entities.Contents { public sealed class ContentOptions diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentSchedulerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentSchedulerGrain.cs index 2743c40a8..beec331d7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentSchedulerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentSchedulerGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using NodaTime; using Orleans; using Orleans.Runtime; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentsSearchSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentsSearchSource.cs index 76d8bbb7b..164805e67 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentsSearchSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ContentsSearchSource.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.ConvertContent; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterDeleter.cs index 68bae84e7..07a9c3c7d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterGrain.cs index ec4d4ac40..b97549060 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.States; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterJintExtension.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterJintExtension.cs index 4e4e63052..70a7d7234 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/CounterJintExtension.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Orleans; using Squidex.Domain.Apps.Core.Scripting; using Squidex.Infrastructure; @@ -22,7 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.Counter this.grainFactory = grainFactory; } - public void Extend(ExecutionContext context) + public void Extend(ScriptExecutionContext context) { if (context.TryGetValue("appId", out var appId)) { diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/ICounterGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/ICounterGrain.cs index fa814073c..1318e107f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/ICounterGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Counter/ICounterGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Domain.Apps.Entities.Contents.Counter diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultContentWorkflow.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultContentWorkflow.cs index a29dab387..35def042b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultContentWorkflow.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultContentWorkflow.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultWorkflowsValidator.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultWorkflowsValidator.cs index a2bc0031a..c29a28786 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultWorkflowsValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DefaultWorkflowsValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentCommandMiddleware.cs index 4180dd66a..35f6576e8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Domain.Apps.Entities.Contents.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs index 47d5d35b2..b2bae63c8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObjectGrain.cs index a5b455821..3ec7fb4a1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs index 5bdf5fd10..c77b9fbd7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Contents.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentsBulkUpdateCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentsBulkUpdateCommandMiddleware.cs index 097b8f28e..d48af3d23 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentsBulkUpdateCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentsBulkUpdateCommandMiddleware.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; @@ -19,6 +15,7 @@ using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Translations; +using Squidex.Log; using Squidex.Shared; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter @@ -30,6 +27,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject { private readonly IContentQueryService contentQuery; private readonly IContextProvider contextProvider; + private readonly ISemanticLog log; private sealed record BulkTaskCommand(BulkTask Task, DomainId Id, ICommand Command) { @@ -46,10 +44,14 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject { } - public ContentsBulkUpdateCommandMiddleware(IContentQueryService contentQuery, IContextProvider contextProvider) + public ContentsBulkUpdateCommandMiddleware( + IContentQueryService contentQuery, + IContextProvider contextProvider, + ISemanticLog log) { this.contentQuery = contentQuery; this.contextProvider = contextProvider; + this.log = log; } public async Task HandleAsync(CommandContext context, NextDelegate next) @@ -134,7 +136,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject } } - private static async Task ExecuteCommandAsync(BulkTaskCommand bulkCommand) + private async Task ExecuteCommandAsync(BulkTaskCommand bulkCommand) { var (task, id, command) = bulkCommand; @@ -146,6 +148,12 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject } catch (Exception ex) { + log.LogError(ex, w => w + .WriteProperty("action", "BulkContent") + .WriteProperty("status", "Failed") + .WriteProperty("jobIndex", task.JobIndex) + .WriteProperty("jobType", task.CommandJob.Type.ToString())); + task.Results.Add(new BulkUpdateResultItem(id, task.JobIndex, ex)); } } @@ -175,6 +183,12 @@ namespace Squidex.Domain.Apps.Entities.Contents.DomainObject } catch (Exception ex) { + log.LogError(ex, w => w + .WriteProperty("action", "BulkContent") + .WriteProperty("status", "Failed") + .WriteProperty("jobIndex", task.JobIndex) + .WriteProperty("jobType", task.CommandJob.Type.ToString())); + task.Results.Add(new BulkUpdateResultItem(id, task.JobIndex, ex)); } } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ScriptingExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ScriptingExtensions.cs index 060a794d9..5ed1747ca 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ScriptingExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ScriptingExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Scripting; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs index 413a3f73e..b8f668a28 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.DefaultValues; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/WorkflowExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/WorkflowExtensions.cs index 27c7ae0f5..9443e4b74 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/WorkflowExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/WorkflowExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/IContentGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/IContentGrain.cs index 0fc20049d..540697bc8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/IContentGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/IContentGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/DynamicContentWorkflow.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/DynamicContentWorkflow.cs index 34eb3957e..cd816567b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/DynamicContentWorkflow.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/DynamicContentWorkflow.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Scripting; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/CachingGraphQLService.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/CachingGraphQLService.cs index 7c75c9ca7..7db0922e4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/CachingGraphQLService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/CachingGraphQLService.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading.Tasks; using GraphQL; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -49,7 +47,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL public async Task ExecuteAsync(ExecutionOptions options) { - var context = ((GraphQLExecutionContext)options.UserContext).Context; + var context = ((GraphQLExecutionContext)options.UserContext!).Context; var model = await GetModelAsync(context.App); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/DefaultDocumentWriter.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/DefaultDocumentWriter.cs index b3f442300..e6b70097b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/DefaultDocumentWriter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/DefaultDocumentWriter.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using GraphQL; using Microsoft.AspNetCore.WebUtilities; using Squidex.Infrastructure.Json; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs index 45dc5d8cc..67ac6c29d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLExecutionContext.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using GraphQL.DataLoader; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Entities.Assets; @@ -57,7 +53,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL Log = log; } - public async Task FindUserAsync(RefToken refToken, + public async Task FindUserAsync(RefToken refToken, CancellationToken ct) { if (refToken.IsClient) diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs index 7ee4c89bd..1a0f7ded8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using GraphQL; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphQLService.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphQLService.cs index 97b355ece..7c4cbdef1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphQLService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphQLService.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using GraphQL; namespace Squidex.Domain.Apps.Entities.Contents.GraphQL diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppMutationsGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppMutationsGraphType.cs index 0377a001e..b15115bbe 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppMutationsGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppMutationsGraphType.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL.Types; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppQueriesGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppQueriesGraphType.cs index f75abbe9b..61b1fa6e1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppQueriesGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/AppQueriesGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using GraphQL.Types; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetActions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetActions.cs index 1328cb44d..c6377677b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetActions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetActions.cs @@ -30,7 +30,8 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Assets public static readonly IFieldResolver Resolver = Resolvers.Sync((source, fieldContext, _) => { - if (fieldContext.Arguments.TryGetValue("path", out var path)) + if (fieldContext.Arguments != null && + fieldContext.Arguments.TryGetValue("path", out var path)) { source.Metadata.TryGetByPath(path.Value as string, out var result); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs index 82f1b0c61..7b974c2a9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL; using GraphQL.Resolvers; using GraphQL.Types; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs index 8f03ab36c..ba8ff235b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Resolvers; using GraphQL.Types; using Squidex.Domain.Apps.Core; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Builder.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Builder.cs index de0646359..68f2c53d5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Builder.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Builder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL; using GraphQL.Resolvers; using GraphQL.Types; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs index 78cc72c6b..27137c318 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Types; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs index 591bc5598..39b3400e8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL.Types; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentActions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentActions.cs index c1e3bdcd5..f35334c94 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentActions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentActions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL; using GraphQL.Resolvers; using GraphQL.Types; @@ -36,7 +35,9 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents public static readonly ValueResolver Resolver = (value, fieldContext, context) => { - if (fieldContext.Arguments.TryGetValue("path", out var v) && v.Value is string path) + if (fieldContext.Arguments != null && + fieldContext.Arguments.TryGetValue("path", out var contextValue) && + contextValue.Value is string path) { value.TryGetByPath(path, out var result); @@ -208,7 +209,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents public static readonly IFieldResolver Resolver = ResolveAsync(Permissions.AppContentsCreate, c => { var contentId = c.GetArgument("id"); - var contentData = c.GetArgument("data"); + var contentData = c.GetArgument("data")!; var contentStatus = c.GetArgument("status"); var command = new CreateContent { Data = contentData }; @@ -272,13 +273,11 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents public static readonly IFieldResolver Resolver = ResolveAsync(Permissions.AppContentsUpsert, c => { - var contentId = c.GetArgument("id"); - var contentData = c.GetArgument("data"); + var contentId = c.GetArgument("id"); + var contentData = c.GetArgument("data")!; var contentStatus = c.GetArgument("status"); - var id = DomainId.Create(contentId); - - var command = new UpsertContent { ContentId = id, Data = contentData }; + var command = new UpsertContent { ContentId = contentId, Data = contentData }; if (!string.IsNullOrWhiteSpace(contentStatus)) { @@ -323,7 +322,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents public static readonly IFieldResolver Resolver = ResolveAsync(Permissions.AppContentsUpdateOwn, c => { var contentId = c.GetArgument("id"); - var contentData = c.GetArgument("data"); + var contentData = c.GetArgument("data")!; return new UpdateContent { ContentId = contentId, Data = contentData }; }); @@ -359,7 +358,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents public static readonly IFieldResolver Resolver = ResolveAsync(Permissions.AppContentsUpdateOwn, c => { var contentId = c.GetArgument("id"); - var contentData = c.GetArgument("data"); + var contentData = c.GetArgument("data")!; return new PatchContent { ContentId = contentId, Data = contentData }; }); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentFields.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentFields.cs index abe6bc4b8..4bbd51a0a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentFields.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentFields.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Resolvers; using GraphQL.Types; using Squidex.Domain.Apps.Core; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs index 4190c71a1..e93e8c25e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL.Types; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResolvers.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResolvers.cs index 2f06a63eb..75b77a60e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResolvers.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResolvers.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL; using GraphQL.Resolvers; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs index 279dce559..8dfa664a0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL.Types; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; @@ -62,7 +60,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents Description = $"The structure of the {schemaInfo.DisplayName} data input type."; } - public override object ParseDictionary(IDictionary value) + public override object ParseDictionary(IDictionary value) { var result = new ContentData(); @@ -74,7 +72,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents { if (source.TryGetValue(field.Name, out var value)) { - if (value is IEnumerable list && field.ResolvedType.Flatten() is IComplexGraphType nestedType) + if (value is IEnumerable list && field.ResolvedType?.Flatten() is IComplexGraphType nestedType) { var array = new JsonArray(list.Count()); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/FieldVisitor.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/FieldVisitor.cs index ca54815c2..f2c6d6f4f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/FieldVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/FieldVisitor.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using GraphQL; using GraphQL.Resolvers; using GraphQL.Types; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs index e85571dca..e8b2214eb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using GraphQL.Types; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives; using Squidex.Infrastructure.Json.Objects; @@ -38,7 +37,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents Description = $"The structure of the {fieldInfo.DisplayName} nested schema."; } - public override object ParseDictionary(IDictionary value) + public override object ParseDictionary(IDictionary value) { var result = JsonValue.Object(); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs index 3e1dd6874..81c783199 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using GraphQL.Types; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/SchemaInfo.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/SchemaInfo.cs index ff920fc4c..7a36f9316 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/SchemaInfo.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/SchemaInfo.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Extensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Extensions.cs index 87889ac9e..83f56ac20 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Extensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Extensions.cs @@ -23,21 +23,24 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types { sb.Append('?'); - foreach (var (key, value) in context.Arguments) + if (context.Arguments != null) { - var formatted = value.Value?.ToString(); - - if (!string.IsNullOrWhiteSpace(formatted)) + foreach (var (key, value) in context.Arguments) { - if (sb.Length > 1) + var formatted = value.Value?.ToString(); + + if (!string.IsNullOrWhiteSpace(formatted)) { - sb.Append('&'); + if (sb.Length > 1) + { + sb.Append('&'); + } + + sb.Append('$'); + sb.Append(key); + sb.Append('='); + sb.Append(formatted); } - - sb.Append('$'); - sb.Append(key); - sb.Append('='); - sb.Append(formatted); } } @@ -61,7 +64,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types internal static string SourceName(this FieldType field) { - return field.GetMetadata(nameof(SourceName)); + return field.GetMetadata(nameof(SourceName))!; } internal static FieldType WithSchemaId(this FieldType field, SchemaInfo value) @@ -71,7 +74,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types internal static string SchemaId(this FieldType field) { - return field.GetMetadata(nameof(SchemaId)); + return field.GetMetadata(nameof(SchemaId))!; } internal static FieldType WithSchemaNamedId(this FieldType field, SchemaInfo value) @@ -81,7 +84,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types internal static NamedId SchemaNamedId(this FieldType field) { - return field.GetMetadata>(nameof(SchemaNamedId)); + return field.GetMetadata>(nameof(SchemaNamedId))!; } private static FieldType WithMetadata(this FieldType field, string key, object value) @@ -91,16 +94,16 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types return field; } - internal static IGraphType Flatten(this QueryArgument type) + internal static IGraphType? Flatten(this QueryArgument type) { - return type.ResolvedType.Flatten(); + return type.ResolvedType?.Flatten(); } - public static IGraphType Flatten(this IGraphType type) + public static IGraphType? Flatten(this IGraphType type) { if (type is IProvideResolvedType provider) { - return provider.ResolvedType.Flatten(); + return provider.ResolvedType?.Flatten(); } return type; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntityResolvers.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntityResolvers.cs index c33f7a9c6..1671868b4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntityResolvers.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntityResolvers.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Resolvers; using Squidex.Infrastructure; using Squidex.Shared.Users; @@ -30,7 +29,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives private static IFieldResolver ResolveUser(Func resolver) { - return Resolvers.Async((source, fieldContext, context) => context.FindUserAsync(resolver(source), fieldContext.CancellationToken)); + return Resolvers.Async((source, fieldContext, context) => context.FindUserAsync(resolver(source), fieldContext.CancellationToken)); } } } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonGraphType.cs index 7c37276ef..5fd325356 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using GraphQL.Language.AST; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonValueNode.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonValueNode.cs index 751c1a7a9..47affa607 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonValueNode.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonValueNode.cs @@ -13,8 +13,8 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives internal sealed class JsonValueNode : ValueNode { public JsonValueNode(IJsonValue value) + : base(value) { - Value = value; } } } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Resolvers.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Resolvers.cs index b66e19308..f378c9e60 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Resolvers.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Resolvers.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using GraphQL; using GraphQL.Resolvers; using Squidex.Infrastructure; @@ -48,11 +46,11 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types public T Resolve(IResolveFieldContext context) { - var executionContext = (GraphQLExecutionContext)context.UserContext; + var executionContext = (GraphQLExecutionContext)context.UserContext!; try { - return resolver((TSource)context.Source, context, executionContext); + return resolver((TSource)context.Source!, context, executionContext); } catch (ValidationException ex) { @@ -90,11 +88,11 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types public async Task Resolve(IResolveFieldContext context) { - var executionContext = (GraphQLExecutionContext)context.UserContext; + var executionContext = (GraphQLExecutionContext)context.UserContext!; try { - return await resolver((TSource)context.Source, context, executionContext); + return await resolver((TSource)context.Source!, context, executionContext); } catch (ValidationException ex) { diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/SharedTypes.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/SharedTypes.cs index ea62d4eab..cd528de0c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/SharedTypes.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/SharedTypes.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Types; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Assets; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs index 33e2f325a..28e73ea27 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using GraphQL.Resolvers; using GraphQL.Types; using Squidex.Domain.Apps.Core; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentLoader.cs index 52215702f..dee3f13a0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Contents diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentQueryService.cs index 7d2542c99..a2ec2c824 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentQueryService.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentWorkflow.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentWorkflow.cs index 2637d27cb..11821a337 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentWorkflow.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/IContentWorkflow.cs @@ -6,7 +6,6 @@ // ========================================================================== using System.Security.Claims; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/IWorkflowsValidator.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/IWorkflowsValidator.cs index 589000e35..9ca8eac66 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/IWorkflowsValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/IWorkflowsValidator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentEnricher.cs index fd4c70d0a..68de8c722 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentEnricher.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentLoader.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentLoader.cs index 7fa920a93..9796dd9d8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentLoader.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentLoader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Contents.DomainObject; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryParser.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryParser.cs index fbdf13af1..b23402bb2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryParser.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryParser.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using Microsoft.OData; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs index 161c82eaa..057d0cae4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Entities.Contents.Repositories; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/GeoQueryTransformer.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/GeoQueryTransformer.cs index 064ed5cef..e8878982c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/GeoQueryTransformer.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/GeoQueryTransformer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Contents.Text; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricher.cs index 8b6c18528..0a2a5d939 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricher.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Contents.Queries { public interface IContentEnricher diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricherStep.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricherStep.cs index d15bcead6..ac468eac1 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricherStep.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/IContentEnricherStep.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/QueryExecutionContext.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/QueryExecutionContext.cs index 233158edb..215717c66 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/QueryExecutionContext.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/QueryExecutionContext.cs @@ -6,10 +6,6 @@ // ========================================================================== using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ConvertData.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ConvertData.cs index 7f21fed21..5fa5bfc89 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ConvertData.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ConvertData.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.ConvertContent; using Squidex.Domain.Apps.Core.ExtractReferenceIds; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichForCaching.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichForCaching.cs index bc99a2c45..fd69dac07 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichForCaching.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichForCaching.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.Caching; namespace Squidex.Domain.Apps.Entities.Contents.Queries.Steps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithSchema.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithSchema.cs index 03eb682b0..70463a152 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithSchema.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithSchema.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Schemas; namespace Squidex.Domain.Apps.Entities.Contents.Queries.Steps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithWorkflows.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithWorkflows.cs index 47b23dbf5..737476ecd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithWorkflows.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/EnrichWithWorkflows.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveAssets.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveAssets.cs index 2689c9533..4df832151 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveAssets.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveAssets.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveReferences.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveReferences.cs index 738bb0b1a..ee3bf0c9d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveReferences.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ResolveReferences.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.ExtractReferenceIds; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ScriptContent.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ScriptContent.cs index 8ffd07cc3..fe9fb44a7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ScriptContent.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/Steps/ScriptContent.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Scripting; namespace Squidex.Domain.Apps.Entities.Contents.Queries.Steps diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesFluidExtension.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesFluidExtension.cs index 95df274e2..519805826 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesFluidExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesFluidExtension.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Text.Encodings.Web; -using System.Threading.Tasks; using Fluid; using Fluid.Ast; using Fluid.Values; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesJintExtension.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesJintExtension.cs index a0897c043..bde2be61e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesJintExtension.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/ReferencesJintExtension.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Jint.Native; using Jint.Runtime; using Microsoft.Extensions.DependencyInjection; @@ -30,7 +26,7 @@ namespace Squidex.Domain.Apps.Entities.Contents this.serviceProvider = serviceProvider; } - public void ExtendAsync(ExecutionContext context) + public void ExtendAsync(ScriptExecutionContext context) { if (!context.TryGetValue("appId", out var appId)) { @@ -48,12 +44,12 @@ namespace Squidex.Domain.Apps.Entities.Contents context.Engine.SetValue("getReferences", action); } - private void GetReferences(ExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) + private void GetReferences(ScriptExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) { GetReferencesAsync(context, appId, user, references, callback).Forget(); } - private async Task GetReferencesAsync(ExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) + private async Task GetReferencesAsync(ScriptExecutionContext context, DomainId appId, ClaimsPrincipal user, JsValue references, Action callback) { Guard.NotNull(callback, nameof(callback)); diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Repositories/IContentRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Repositories/IContentRepository.cs index 4bce39829..4ae7418a9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Repositories/IContentRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Repositories/IContentRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/SingletonCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/SingletonCommandMiddleware.cs index e128efd88..bfe193bf9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/SingletonCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/SingletonCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Contents.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/Extensions.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/Extensions.cs index 4d8dd7942..8eb753e78 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/Extensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/Extensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Text; using GeoJSON.Net; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/ITextIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/ITextIndex.cs index b22561b02..eb2f18744 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/ITextIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/ITextIndex.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/QueryParser.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/QueryParser.cs index 22771d766..3d8953d9d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/QueryParser.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/QueryParser.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Text; namespace Squidex.Domain.Apps.Entities.Contents.Text diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/CachingTextIndexerState.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/CachingTextIndexerState.cs index 698fa184d..5378edd48 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/CachingTextIndexerState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/CachingTextIndexerState.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Caching; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/ITextIndexerState.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/ITextIndexerState.cs index f828f9fe7..e7d68520b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/ITextIndexerState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/ITextIndexerState.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Contents.Text.State diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/InMemoryTextIndexerState.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/InMemoryTextIndexerState.cs index 2b6214793..08f66b58e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/InMemoryTextIndexerState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/InMemoryTextIndexerState.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Contents.Text.State diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/TextContentState.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/TextContentState.cs index fb103a862..e829c0b18 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/TextContentState.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/State/TextContentState.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Contents.Text.State diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexingProcess.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexingProcess.cs index 4d659608d..6ab99b8f8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexingProcess.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexingProcess.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Text.State; using Squidex.Domain.Apps.Events.Contents; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextSearch.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextSearch.cs index eb59b78fd..db496e53e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextSearch.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/TextSearch.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/UpsertIndexEntry.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/UpsertIndexEntry.cs index f2932aeff..ec0aa214b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/UpsertIndexEntry.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/UpsertIndexEntry.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using GeoJSON.Net; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/Validation/DependencyValidatorsFactory.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/Validation/DependencyValidatorsFactory.cs index 2a88bafc8..e4b05e2c8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/Validation/DependencyValidatorsFactory.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/Validation/DependencyValidatorsFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.ValidateContent; using Squidex.Domain.Apps.Core.ValidateContent.Validators; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Context.cs b/backend/src/Squidex.Domain.Apps.Entities/Context.cs index 028b1d51c..e6ad03ca8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Context.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Context.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Security.Claims; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/ContextExtensions.cs b/backend/src/Squidex.Domain.Apps.Entities/ContextExtensions.cs index 6d41975aa..de2dd9a72 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/ContextExtensions.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/ContextExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; - namespace Squidex.Domain.Apps.Entities { public static class ContextExtensions diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEvent.cs b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEvent.cs index 524467096..a057214b9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEvent.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEvent.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using NodaTime; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEventsCreatorBase.cs b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEventsCreatorBase.cs index 56be01d38..9c6a03052 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEventsCreatorBase.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryEventsCreatorBase.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryService.cs b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryService.cs index 1e32e91bd..e909556ba 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/HistoryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/HistoryService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.History.Repositories; using Squidex.Domain.Apps.Events; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryEventsCreator.cs b/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryEventsCreator.cs index 47c690906..9f6b0a86d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryEventsCreator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryEventsCreator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Domain.Apps.Entities.History diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryService.cs b/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryService.cs index ddd0e7f3e..1070e10b3 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/IHistoryService.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.History diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs b/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs index 1452a1a3c..5bc79bda7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using NodaTime; using Notifo.SDK; diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/ParsedHistoryEvent.cs b/backend/src/Squidex.Domain.Apps.Entities/History/ParsedHistoryEvent.cs index 1e785828b..8b57ab288 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/ParsedHistoryEvent.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/ParsedHistoryEvent.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; using Squidex.Infrastructure; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/Repositories/IHistoryEventRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/History/Repositories/IHistoryEventRepository.cs index 2673f0828..9819e4865 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/Repositories/IHistoryEventRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/Repositories/IHistoryEventRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.History.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/IAppProvider.cs b/backend/src/Squidex.Domain.Apps.Entities/IAppProvider.cs index 22e079446..fd1f09be2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/IAppProvider.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/IAppProvider.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Rules; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/IDeleter.cs b/backend/src/Squidex.Domain.Apps.Entities/IDeleter.cs index da139bf3f..ad912860e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/IDeleter.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/IDeleter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/IEntityWithTags.cs b/backend/src/Squidex.Domain.Apps.Entities/IEntityWithTags.cs index 1049ae23d..7f89a375a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/IEntityWithTags.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/IEntityWithTags.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities { public interface IEntityWithTags diff --git a/backend/src/Squidex.Domain.Apps.Entities/Notifications/INotificationSender.cs b/backend/src/Squidex.Domain.Apps.Entities/Notifications/INotificationSender.cs index 2dbd3e149..96de5b228 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Notifications/INotificationSender.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Notifications/INotificationSender.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Shared.Users; namespace Squidex.Domain.Apps.Entities.Notifications diff --git a/backend/src/Squidex.Domain.Apps.Entities/Notifications/NoopNotificationSender.cs b/backend/src/Squidex.Domain.Apps.Entities/Notifications/NoopNotificationSender.cs index 89587f5d5..b0da54368 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Notifications/NoopNotificationSender.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Notifications/NoopNotificationSender.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Shared.Users; namespace Squidex.Domain.Apps.Entities.Notifications diff --git a/backend/src/Squidex.Domain.Apps.Entities/Notifications/NotificationEmailSender.cs b/backend/src/Squidex.Domain.Apps.Entities/Notifications/NotificationEmailSender.cs index 824249d4b..1b004ef41 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Notifications/NotificationEmailSender.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Notifications/NotificationEmailSender.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Domain.Apps.Core; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/OperationContextBase.cs b/backend/src/Squidex.Domain.Apps.Entities/OperationContextBase.cs index a30579aac..1bfcca667 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/OperationContextBase.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/OperationContextBase.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Security.Claims; using Microsoft.Extensions.DependencyInjection; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Q.cs b/backend/src/Squidex.Domain.Apps.Entities/Q.cs index 37b9251d8..24d5f7da9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Q.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Q.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using NodaTime; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/BackupRules.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/BackupRules.cs index f492111aa..e5bc08b65 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/BackupRules.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/BackupRules.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Backup; using Squidex.Domain.Apps.Entities.Rules.DomainObject; using Squidex.Domain.Apps.Events.Rules; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/GuardRule.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/GuardRule.cs index 95c3148c1..dc070dcfc 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/GuardRule.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/GuardRule.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules.Commands; using Squidex.Infrastructure; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/RuleTriggerValidator.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/RuleTriggerValidator.cs index ac432fcd6..5714bd20a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/RuleTriggerValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/Guards/RuleTriggerValidator.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.Triggers; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/IRuleGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/IRuleGrain.cs index 28bea32f5..6d5d0f264 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/IRuleGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/IRuleGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObject.cs index c669036e1..a84148326 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObject.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules.Commands; using Squidex.Domain.Apps.Entities.Rules.DomainObject.Guards; using Squidex.Domain.Apps.Events; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObjectGrain.cs index b62c34edc..40e39bf6f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/DomainObject/RuleDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnqueuer.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnqueuer.cs index 8cf278482..a5032150f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnqueuer.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnqueuer.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Rules; using Squidex.Infrastructure; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnricher.cs index af9b2f33f..3ed2e7e52 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleEnricher.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Rules { public interface IRuleEnricher diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleQueryService.cs index aa41cc398..e0723a659 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/IRuleQueryService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Rules { public interface IRuleQueryService diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesCacheGrain.cs index 3bb2baaf5..2bbde1a56 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesCacheGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesIndex.cs index 8e870a01d..e2bbc9392 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/IRulesIndex.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Rules.Indexes diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesCacheGrain.cs index 694e38ec7..bb0cac147 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesCacheGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans.Concurrency; using Squidex.Domain.Apps.Entities.Rules.Repositories; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesIndex.cs index d051f9225..45189ce69 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Indexes/RulesIndex.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Rules.Commands; using Squidex.Domain.Apps.Entities.Rules.DomainObject; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/ManualTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/ManualTriggerHandler.cs index 56662aaaf..8a0f08525 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/ManualTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/ManualTriggerHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleEnricher.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleEnricher.cs index 65636948a..b4383b9e0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleEnricher.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleEnricher.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules.Repositories; using Squidex.Infrastructure; using Squidex.Infrastructure.Caching; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleQueryService.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleQueryService.cs index 90fa97219..c8082d462 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleQueryService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Queries/RuleQueryService.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules.Indexes; namespace Squidex.Domain.Apps.Entities.Rules.Queries diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleEventRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleEventRepository.cs index 309a315ff..f376f5886 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleEventRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleEventRepository.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleRepository.cs index 681c1ca90..b3a303b6d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Repositories/IRuleRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Rules.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleCommandMiddleware.cs index 8118b2eda..05da32f46 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Entities.Rules.Commands; using Squidex.Domain.Apps.Entities.Rules.DomainObject; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleDequeuerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleDequeuerGrain.cs index eba840650..33d8f7695 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleDequeuerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleDequeuerGrain.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using NodaTime; using Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleEnqueuer.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleEnqueuer.cs index 10c612e8a..8d9a3478f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleEnqueuer.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleEnqueuer.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Squidex.Caching; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleJobUpdate.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleJobUpdate.cs index 13f523d10..f9971ed96 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleJobUpdate.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/RuleJobUpdate.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/DefaultRuleRunnerService.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/DefaultRuleRunnerService.cs index b86832325..ac868fb78 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/DefaultRuleRunnerService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/DefaultRuleRunnerService.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using NodaTime; using Orleans; using Squidex.Domain.Apps.Core.HandleRules; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerGrain.cs index b61586cbb..4d60c5587 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerService.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerService.cs index 23008f265..d741f8cde 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/IRuleRunnerService.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Rules.Runner diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerGrain.cs index a5a73f96d..a8c297ac2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/Runner/RuleRunnerGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Orleans; using Orleans.Runtime; using Squidex.Caching; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/IUsageTrackerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/IUsageTrackerGrain.cs index 704b811d6..f2f6c4ed5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/IUsageTrackerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/IUsageTrackerGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerCommandMiddleware.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerCommandMiddleware.cs index 8196a5c1e..432244284 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerCommandMiddleware.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Core.Rules.Triggers; using Squidex.Domain.Apps.Entities.Rules.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs index 4081418a3..1e465b0b0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans; using Orleans.Concurrency; using Orleans.Runtime; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTriggerHandler.cs index c5053f1fd..f1ae588fb 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTriggerHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/BackupSchemas.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/BackupSchemas.cs index 25626e34f..0ccefbf26 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/BackupSchemas.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/BackupSchemas.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Backup; using Squidex.Domain.Apps.Entities.Schemas.DomainObject; using Squidex.Domain.Apps.Events.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/ConfigureFieldRules.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/ConfigureFieldRules.cs index b35ab407e..2ba3bfa2a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/ConfigureFieldRules.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/ConfigureFieldRules.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; namespace Squidex.Domain.Apps.Entities.Schemas.Commands diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/IUpsertCommand.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/IUpsertCommand.cs index fa5a6a430..8687817dd 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/IUpsertCommand.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Commands/IUpsertCommand.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/FieldPropertiesValidator.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/FieldPropertiesValidator.cs index 271655de9..2783fe07d 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/FieldPropertiesValidator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/FieldPropertiesValidator.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/GuardSchema.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/GuardSchema.cs index 673a579a5..64885f247 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/GuardSchema.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/Guards/GuardSchema.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/ISchemaGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/ISchemaGrain.cs index 96da03161..3d3a0fe84 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/ISchemaGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/ISchemaGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.State.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.State.cs index 7281d6d6b..3f94fcc7c 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.State.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.State.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Runtime.Serialization; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.cs index 8deed0b20..1231a888b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObject.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.EventSynchronization; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObjectGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObjectGrain.cs index 0163d02d6..6c906605a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObjectGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/DomainObject/SchemaDomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/ISchemasHash.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/ISchemasHash.cs index 485d18ca3..5b1c744d6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/ISchemasHash.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/ISchemasHash.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using NodaTime; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasCacheGrain.cs index 8b7278c2a..ff29161c3 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasCacheGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans.Indexes; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasIndex.cs index a6fee1ba4..1488b3511 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/ISchemasIndex.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Schemas.Indexes diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasCacheGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasCacheGrain.cs index 3052fd0e9..e8016e1a4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasCacheGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasCacheGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Orleans.Concurrency; using Squidex.Domain.Apps.Entities.Schemas.Repositories; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasIndex.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasIndex.cs index d5f06f3cb..0c2658361 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasIndex.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Indexes/SchemasIndex.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Orleans; using Squidex.Caching; using Squidex.Domain.Apps.Entities.Schemas.Commands; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Repositories/ISchemaRepository.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Repositories/ISchemaRepository.cs index 92d0df477..436a286b9 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/Repositories/ISchemaRepository.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/Repositories/ISchemaRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Schemas.Repositories diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaChangedTriggerHandler.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaChangedTriggerHandler.cs index 64d177d2a..543239ee0 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaChangedTriggerHandler.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaChangedTriggerHandler.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules.EnrichedEvents; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaHistoryEventsCreator.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaHistoryEventsCreator.cs index d53c5e00e..a5e9ba47b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaHistoryEventsCreator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemaHistoryEventsCreator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.History; using Squidex.Domain.Apps.Events; using Squidex.Domain.Apps.Events.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemasSearchSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemasSearchSource.cs index 9c5f429be..e7ac72d42 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemasSearchSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Schemas/SchemasSearchSource.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Scripting/ScriptingCompletion.cs b/backend/src/Squidex.Domain.Apps.Entities/Scripting/ScriptingCompletion.cs index 3e684a0ea..de81241e6 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Scripting/ScriptingCompletion.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Scripting/ScriptingCompletion.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchManager.cs b/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchManager.cs index 8a93d9bf4..e237bdee5 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchManager.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchManager.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Search { public interface ISearchManager diff --git a/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchSource.cs b/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchSource.cs index 38e52f0dd..325985265 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchSource.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Search/ISearchSource.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Apps.Entities.Search { public interface ISearchSource diff --git a/backend/src/Squidex.Domain.Apps.Entities/Search/SearchManager.cs b/backend/src/Squidex.Domain.Apps.Entities/Search/SearchManager.cs index 1995bd2f0..aaa6dbcf8 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Search/SearchManager.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Search/SearchManager.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Log; namespace Squidex.Domain.Apps.Entities.Search diff --git a/backend/src/Squidex.Domain.Apps.Entities/Search/SearchResults.cs b/backend/src/Squidex.Domain.Apps.Entities/Search/SearchResults.cs index 9edd5b98b..a301c10ec 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Search/SearchResults.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Search/SearchResults.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities.Search { public sealed class SearchResults : List diff --git a/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj b/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj index 54b7a6852..8ed81dda7 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj +++ b/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -17,28 +18,28 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers - + - + diff --git a/backend/src/Squidex.Domain.Apps.Entities/Tags/GrainTagService.cs b/backend/src/Squidex.Domain.Apps.Entities/Tags/GrainTagService.cs index 7b0940804..035290358 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Tags/GrainTagService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Tags/GrainTagService.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Core.Tags; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGenerator.cs b/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGenerator.cs index 504c85d53..79432f642 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGenerator.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGenerator.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Domain.Apps.Entities.Tags { public interface ITagGenerator diff --git a/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGrain.cs index 61ff4b9ec..4c118414e 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Tags/ITagGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans; using Squidex.Domain.Apps.Core.Tags; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Tags/TagGrain.cs b/backend/src/Squidex.Domain.Apps.Entities/Tags/TagGrain.cs index 6c96afbd5..95aed177f 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Tags/TagGrain.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Tags/TagGrain.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Core.Tags; using Squidex.Infrastructure; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Domain.Apps.Events/Assets/AssetAnnotated.cs b/backend/src/Squidex.Domain.Apps.Events/Assets/AssetAnnotated.cs index 004e0f77e..1b503677c 100644 --- a/backend/src/Squidex.Domain.Apps.Events/Assets/AssetAnnotated.cs +++ b/backend/src/Squidex.Domain.Apps.Events/Assets/AssetAnnotated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Events/Assets/AssetCreated.cs b/backend/src/Squidex.Domain.Apps.Events/Assets/AssetCreated.cs index 06e044bf1..473ebf87e 100644 --- a/backend/src/Squidex.Domain.Apps.Events/Assets/AssetCreated.cs +++ b/backend/src/Squidex.Domain.Apps.Events/Assets/AssetCreated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Infrastructure; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Domain.Apps.Events/Comments/CommentCreated.cs b/backend/src/Squidex.Domain.Apps.Events/Comments/CommentCreated.cs index 77bd8bc5e..72aa42950 100644 --- a/backend/src/Squidex.Domain.Apps.Events/Comments/CommentCreated.cs +++ b/backend/src/Squidex.Domain.Apps.Events/Comments/CommentCreated.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Domain.Apps.Events.Comments diff --git a/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj b/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj index 7da75c85f..43da73849 100644 --- a/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj +++ b/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -13,11 +14,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Domain.Users.MongoDb/MongoRoleStore.cs b/backend/src/Squidex.Domain.Users.MongoDb/MongoRoleStore.cs index c1d63fa5f..a412a4b75 100644 --- a/backend/src/Squidex.Domain.Users.MongoDb/MongoRoleStore.cs +++ b/backend/src/Squidex.Domain.Users.MongoDb/MongoRoleStore.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using MongoDB.Bson; using MongoDB.Bson.Serialization; diff --git a/backend/src/Squidex.Domain.Users.MongoDb/MongoUser.cs b/backend/src/Squidex.Domain.Users.MongoDb/MongoUser.cs index 28652e423..777a2d92a 100644 --- a/backend/src/Squidex.Domain.Users.MongoDb/MongoUser.cs +++ b/backend/src/Squidex.Domain.Users.MongoDb/MongoUser.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Security.Claims; using Microsoft.AspNetCore.Identity; using MongoDB.Bson.Serialization.Attributes; diff --git a/backend/src/Squidex.Domain.Users.MongoDb/MongoUserStore.cs b/backend/src/Squidex.Domain.Users.MongoDb/MongoUserStore.cs index 55e4f4607..b0860198b 100644 --- a/backend/src/Squidex.Domain.Users.MongoDb/MongoUserStore.cs +++ b/backend/src/Squidex.Domain.Users.MongoDb/MongoUserStore.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using MongoDB.Bson; using MongoDB.Bson.Serialization; diff --git a/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj b/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj index 002e3b63c..7fbd5b629 100644 --- a/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj +++ b/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -18,12 +19,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Domain.Users/DefaultKeyStore.cs b/backend/src/Squidex.Domain.Users/DefaultKeyStore.cs index 1cee64f26..1ac5060a6 100644 --- a/backend/src/Squidex.Domain.Users/DefaultKeyStore.cs +++ b/backend/src/Squidex.Domain.Users/DefaultKeyStore.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Security.Cryptography; -using System.Threading.Tasks; using IdentityModel; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; diff --git a/backend/src/Squidex.Domain.Users/DefaultUserPictureStore.cs b/backend/src/Squidex.Domain.Users/DefaultUserPictureStore.cs index 9b388387b..8cd1f8774 100644 --- a/backend/src/Squidex.Domain.Users/DefaultUserPictureStore.cs +++ b/backend/src/Squidex.Domain.Users/DefaultUserPictureStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Squidex.Assets; namespace Squidex.Domain.Users diff --git a/backend/src/Squidex.Domain.Users/DefaultUserResolver.cs b/backend/src/Squidex.Domain.Users/DefaultUserResolver.cs index ded9310f9..64612c847 100644 --- a/backend/src/Squidex.Domain.Users/DefaultUserResolver.cs +++ b/backend/src/Squidex.Domain.Users/DefaultUserResolver.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Squidex.Infrastructure; using Squidex.Shared.Users; @@ -33,16 +28,18 @@ namespace Squidex.Domain.Users { Guard.NotNullOrEmpty(email, nameof(email)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); try { - var user = await userService.CreateAsync(email, new UserValues + var values = new UserValues { Invited = invited - }, ct: ct); + }; + + var user = await userService.CreateAsync(email, values, ct: ct); return (user, true); } @@ -63,7 +60,7 @@ namespace Squidex.Domain.Users Guard.NotNullOrEmpty(type, nameof(type)); Guard.NotNullOrEmpty(value, nameof(value)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); @@ -84,7 +81,7 @@ namespace Squidex.Domain.Users { Guard.NotNullOrEmpty(id, nameof(id)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); @@ -97,11 +94,11 @@ namespace Squidex.Domain.Users { Guard.NotNullOrEmpty(idOrEmail, nameof(idOrEmail)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); - if (idOrEmail.Contains("@", StringComparison.Ordinal)) + if (idOrEmail.Contains('@', StringComparison.Ordinal)) { return await userService.FindByEmailAsync(idOrEmail, ct); } @@ -115,7 +112,7 @@ namespace Squidex.Domain.Users public async Task> QueryAllAsync( CancellationToken ct = default) { - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); @@ -130,7 +127,7 @@ namespace Squidex.Domain.Users { Guard.NotNullOrEmpty(email, nameof(email)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); @@ -145,7 +142,7 @@ namespace Squidex.Domain.Users { Guard.NotNull(ids, nameof(ids)); - using (var scope = serviceProvider.CreateScope()) + await using (var scope = serviceProvider.CreateAsyncScope()) { var userService = scope.ServiceProvider.GetRequiredService(); diff --git a/backend/src/Squidex.Domain.Users/DefaultUserService.cs b/backend/src/Squidex.Domain.Users/DefaultUserService.cs index d3f2fb26f..488c9629f 100644 --- a/backend/src/Squidex.Domain.Users/DefaultUserService.cs +++ b/backend/src/Squidex.Domain.Users/DefaultUserService.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Squidex.Infrastructure; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Users/DefaultXmlRepository.cs b/backend/src/Squidex.Domain.Users/DefaultXmlRepository.cs index 7a9c7fbba..554ce6f9a 100644 --- a/backend/src/Squidex.Domain.Users/DefaultXmlRepository.cs +++ b/backend/src/Squidex.Domain.Users/DefaultXmlRepository.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.AspNetCore.DataProtection.Repositories; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Domain.Users/IUserEvents.cs b/backend/src/Squidex.Domain.Users/IUserEvents.cs index b9d6d5ec7..01deaebf4 100644 --- a/backend/src/Squidex.Domain.Users/IUserEvents.cs +++ b/backend/src/Squidex.Domain.Users/IUserEvents.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Shared.Users; namespace Squidex.Domain.Users diff --git a/backend/src/Squidex.Domain.Users/IUserPictureStore.cs b/backend/src/Squidex.Domain.Users/IUserPictureStore.cs index 8f16f8d1b..885130441 100644 --- a/backend/src/Squidex.Domain.Users/IUserPictureStore.cs +++ b/backend/src/Squidex.Domain.Users/IUserPictureStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Domain.Users { public interface IUserPictureStore diff --git a/backend/src/Squidex.Domain.Users/IUserService.cs b/backend/src/Squidex.Domain.Users/IUserService.cs index df6966e34..d8974b818 100644 --- a/backend/src/Squidex.Domain.Users/IUserService.cs +++ b/backend/src/Squidex.Domain.Users/IUserService.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Squidex.Infrastructure; using Squidex.Shared.Users; diff --git a/backend/src/Squidex.Domain.Users/InMemory/Extensions.cs b/backend/src/Squidex.Domain.Users/InMemory/Extensions.cs index bd8382a66..6b48cd8b9 100644 --- a/backend/src/Squidex.Domain.Users/InMemory/Extensions.cs +++ b/backend/src/Squidex.Domain.Users/InMemory/Extensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Domain.Users.InMemory { public static class Extensions diff --git a/backend/src/Squidex.Domain.Users/InMemory/ImmutableApplication.cs b/backend/src/Squidex.Domain.Users/InMemory/ImmutableApplication.cs index f49aacdd7..6b0c67073 100644 --- a/backend/src/Squidex.Domain.Users/InMemory/ImmutableApplication.cs +++ b/backend/src/Squidex.Domain.Users/InMemory/ImmutableApplication.cs @@ -7,7 +7,6 @@ using System.Collections.Immutable; using System.Globalization; -using System.Linq; using System.Text.Json; using OpenIddict.Abstractions; diff --git a/backend/src/Squidex.Domain.Users/InMemory/InMemoryApplicationStore.cs b/backend/src/Squidex.Domain.Users/InMemory/InMemoryApplicationStore.cs index 42106cb19..d1f3db0a0 100644 --- a/backend/src/Squidex.Domain.Users/InMemory/InMemoryApplicationStore.cs +++ b/backend/src/Squidex.Domain.Users/InMemory/InMemoryApplicationStore.cs @@ -5,15 +5,10 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; -using System.Linq; using System.Runtime.CompilerServices; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using OpenIddict.Abstractions; namespace Squidex.Domain.Users.InMemory diff --git a/backend/src/Squidex.Domain.Users/InMemory/InMemoryScopeStore.cs b/backend/src/Squidex.Domain.Users/InMemory/InMemoryScopeStore.cs index 50889ec5c..fa2dbe30d 100644 --- a/backend/src/Squidex.Domain.Users/InMemory/InMemoryScopeStore.cs +++ b/backend/src/Squidex.Domain.Users/InMemory/InMemoryScopeStore.cs @@ -5,15 +5,10 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; -using System.Linq; using System.Runtime.CompilerServices; using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; using OpenIddict.Abstractions; namespace Squidex.Domain.Users.InMemory diff --git a/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj b/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj index 08c6b589c..f6a7e045d 100644 --- a/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj +++ b/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -16,14 +17,14 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/backend/src/Squidex.Domain.Users/UserClaimsPrincipalFactoryWithEmail.cs b/backend/src/Squidex.Domain.Users/UserClaimsPrincipalFactoryWithEmail.cs index e21c51820..c8be49959 100644 --- a/backend/src/Squidex.Domain.Users/UserClaimsPrincipalFactoryWithEmail.cs +++ b/backend/src/Squidex.Domain.Users/UserClaimsPrincipalFactoryWithEmail.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Users/UserManagerExtensions.cs b/backend/src/Squidex.Domain.Users/UserManagerExtensions.cs index 52fa9ba33..5488e04fd 100644 --- a/backend/src/Squidex.Domain.Users/UserManagerExtensions.cs +++ b/backend/src/Squidex.Domain.Users/UserManagerExtensions.cs @@ -5,12 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; using System.Text; -using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Squidex.Infrastructure.Translations; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex.Domain.Users/UserValues.cs b/backend/src/Squidex.Domain.Users/UserValues.cs index 5726d02d8..de04cf379 100644 --- a/backend/src/Squidex.Domain.Users/UserValues.cs +++ b/backend/src/Squidex.Domain.Users/UserValues.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Security.Claims; using Squidex.Infrastructure.Security; diff --git a/backend/src/Squidex.Domain.Users/UserWithClaims.cs b/backend/src/Squidex.Domain.Users/UserWithClaims.cs index 4e7dc2a88..64c8e5837 100644 --- a/backend/src/Squidex.Domain.Users/UserWithClaims.cs +++ b/backend/src/Squidex.Domain.Users/UserWithClaims.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Security.Claims; using Microsoft.AspNetCore.Identity; using Squidex.Shared.Users; diff --git a/backend/src/Squidex.Infrastructure.Azure/Squidex.Infrastructure.Azure.csproj b/backend/src/Squidex.Infrastructure.Azure/Squidex.Infrastructure.Azure.csproj index 5976e7b27..eb3095b91 100644 --- a/backend/src/Squidex.Infrastructure.Azure/Squidex.Infrastructure.Azure.csproj +++ b/backend/src/Squidex.Infrastructure.Azure/Squidex.Infrastructure.Azure.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Infrastructure - 9.0 + 10.0 + enable enable diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/Diagnostics/GetEventStoreHealthCheck.cs b/backend/src/Squidex.Infrastructure.GetEventStore/Diagnostics/GetEventStoreHealthCheck.cs index 2b8e40ac2..9102277d1 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/Diagnostics/GetEventStoreHealthCheck.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/Diagnostics/GetEventStoreHealthCheck.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using EventStore.Client; using Microsoft.Extensions.Diagnostics.HealthChecks; diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/EventStoreProjectionClient.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/EventStoreProjectionClient.cs index 94e288bac..0ab8f8050 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/EventStoreProjectionClient.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/EventStoreProjectionClient.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Threading.Tasks; using EventStore.Client; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Formatter.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Formatter.cs index 4a5c202c8..82f4f1d5d 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Formatter.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Formatter.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Text; using EventStore.Client; using Squidex.Infrastructure.Json; diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs index ba33e12f9..a0d2ba21a 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using EventStore.Client; using NodaTime; using Squidex.Hosting; diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs index a32f92363..201fb11f1 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using EventStore.Client; using Squidex.Infrastructure.Json; @@ -33,14 +30,14 @@ namespace Squidex.Infrastructure.EventSourcing var streamName = await projectionClient.CreateProjectionAsync(streamFilter); - Func onEvent = async (_, @event, _) => + async Task OnEvent(StreamSubscription subscription, ResolvedEvent @event, CancellationToken ct) { var storedEvent = Formatter.Read(@event, prefix, serializer); await subscriber.OnEventAsync(this, storedEvent); - }; + } - Action? onError = (_, reason, ex) => + void OnError(StreamSubscription subscription, SubscriptionDroppedReason reason, Exception? ex) { if (reason != SubscriptionDroppedReason.Disposed && reason != SubscriptionDroppedReason.SubscriberError) @@ -49,22 +46,22 @@ namespace Squidex.Infrastructure.EventSourcing subscriber.OnErrorAsync(this, ex); } - }; + } if (!string.IsNullOrWhiteSpace(position)) { var streamPosition = position.ToPosition(true); subscription = await client.SubscribeToStreamAsync(streamName, streamPosition, - onEvent, true, - onError, + OnEvent, true, + OnError, cancellationToken: ct); } else { subscription = await client.SubscribeToStreamAsync(streamName, - onEvent, true, - onError, + OnEvent, true, + OnError, cancellationToken: ct); } }, cts.Token); diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Utils.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Utils.cs index 72b51380b..cbbba3e3e 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Utils.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/Utils.cs @@ -5,10 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Globalization; using System.Runtime.CompilerServices; -using System.Threading; using EventStore.Client; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj b/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj index 9493e9734..88886eba5 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj +++ b/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Infrastructure - 9.0 + 10.0 + enable enable @@ -14,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Diagnostics/MongoDBHealthCheck.cs b/backend/src/Squidex.Infrastructure.MongoDb/Diagnostics/MongoDBHealthCheck.cs index 6f842f832..1fa864178 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Diagnostics/MongoDBHealthCheck.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/Diagnostics/MongoDBHealthCheck.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; using MongoDB.Driver; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/FilterExtensions.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/FilterExtensions.cs index 70506163d..33df4ae0a 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/FilterExtensions.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/FilterExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using MongoDB.Driver; namespace Squidex.Infrastructure.EventSourcing @@ -32,7 +30,7 @@ namespace Squidex.Infrastructure.EventSourcing return null; } - if (streamFilter.Contains("^", StringComparison.Ordinal)) + if (streamFilter.Contains('^', StringComparison.Ordinal)) { return Builders.Filter.Regex(x => x.EventStream, streamFilter); } @@ -49,7 +47,7 @@ namespace Squidex.Infrastructure.EventSourcing return null; } - if (streamFilter.Contains("^", StringComparison.Ordinal)) + if (streamFilter.Contains('^', StringComparison.Ordinal)) { return Builders>.Filter.Regex(x => x.FullDocument.EventStream, streamFilter); } diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventCommit.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventCommit.cs index 3b643d517..10b3cea84 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventCommit.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventCommit.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs index 07baf6e09..7db325a12 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Core.Clusters; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStoreSubscription.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStoreSubscription.cs index f75f046cc..8ec276bb4 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStoreSubscription.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStoreSubscription.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using NodaTime; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs index afea04489..d6854c172 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using NodaTime; using Squidex.Infrastructure.MongoDb; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Writer.cs b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Writer.cs index ab226e6be..5902c29ad 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Writer.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Writer.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequest.cs b/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequest.cs index fe7ed1284..fd51bc0ab 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequest.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequest.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; using NodaTime; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequestLogRepository.cs b/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequestLogRepository.cs index cbdd59fc0..0d5378ba2 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequestLogRepository.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/Log/MongoRequestLogRepository.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using MongoDB.Driver; using NodaTime; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Migrations/MongoMigrationStatus.cs b/backend/src/Squidex.Infrastructure.MongoDb/Migrations/MongoMigrationStatus.cs index 74f39017e..f4ec03177 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Migrations/MongoMigrationStatus.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/Migrations/MongoMigrationStatus.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Infrastructure.MongoDb; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonHelper.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonHelper.cs index ba1cbce97..49e740f0a 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonHelper.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonHelper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.MongoDb { public static class BsonHelper diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonAttribute.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonAttribute.cs index c8b50ec74..9e67a2d1b 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonAttribute.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.MongoDb { [AttributeUsage(AttributeTargets.Property)] diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonConvention.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonConvention.cs index 85aceeb4e..c099fc00d 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonConvention.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonConvention.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Reflection; using MongoDB.Bson; using MongoDB.Bson.Serialization; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonReader.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonReader.cs index ac69d199a..ae9bd5697 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonReader.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonReader.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson; using MongoDB.Bson.IO; using NewtonsoftJsonReader = Newtonsoft.Json.JsonReader; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonWriter.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonWriter.cs index 3b5fe73a4..67812bb66 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonWriter.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/BsonJsonWriter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson.IO; using NewtonsoftJSonWriter = Newtonsoft.Json.JsonWriter; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/DomainIdSerializer.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/DomainIdSerializer.cs index b97a33913..1d8183693 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/DomainIdSerializer.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/DomainIdSerializer.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson; using MongoDB.Bson.Serialization; using MongoDB.Bson.Serialization.Serializers; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Field.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Field.cs index 50ebc572e..7b73cc054 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Field.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Field.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson.Serialization; namespace Squidex.Infrastructure.MongoDb diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/FieldDefinitionBuilder.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/FieldDefinitionBuilder.cs index 9576138f5..abc359d7c 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/FieldDefinitionBuilder.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/FieldDefinitionBuilder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Linq.Expressions; using MongoDB.Driver; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs index 365ec1790..f4a645019 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs @@ -5,13 +5,9 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; using System.Linq.Expressions; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Squidex.Infrastructure.States; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoRepositoryBase.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoRepositoryBase.cs index 2b6fafd12..b162cfa3a 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoRepositoryBase.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoRepositoryBase.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Hosting; using Squidex.Hosting.Configuration; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/FilterVisitor.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/FilterVisitor.cs index 2ea715dc7..3eca4e2cc 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/FilterVisitor.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/FilterVisitor.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections; -using System.Linq; using System.Text.RegularExpressions; using MongoDB.Bson; using MongoDB.Driver; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/SortBuilder.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/SortBuilder.cs index 315bf34cd..e99a084b6 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/SortBuilder.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/Queries/SortBuilder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using MongoDB.Driver; using Squidex.Infrastructure.Queries; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/TypeConverterStringSerializer.cs b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/TypeConverterStringSerializer.cs index 4408d2a50..6d2b60cd8 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/TypeConverterStringSerializer.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/MongoDb/TypeConverterStringSerializer.cs @@ -45,7 +45,7 @@ namespace Squidex.Infrastructure.MongoDb { var value = context.Reader.ReadString(); - return (T)typeConverter.ConvertFromInvariantString(value); + return (T)typeConverter.ConvertFromInvariantString(value)!; } } diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj b/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj index 2f0c286ed..775571f19 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj +++ b/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Infrastructure - 9.0 + 10.0 + enable enable @@ -13,15 +14,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/backend/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStoreBase.cs b/backend/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStoreBase.cs index 1ffdf5f67..686f8d6b3 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStoreBase.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStoreBase.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using Newtonsoft.Json; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsage.cs b/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsage.cs index 1dbe60697..d5e55a94c 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsage.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsage.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; diff --git a/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsageRepository.cs b/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsageRepository.cs index 87c95036b..958087d8a 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsageRepository.cs +++ b/backend/src/Squidex.Infrastructure.MongoDb/UsageTracking/MongoUsageRepository.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using MongoDB.Driver; using Squidex.Infrastructure.MongoDb; diff --git a/backend/src/Squidex.Infrastructure.RabbitMq/CQRS/Events/RabbitMqEventConsumer.cs b/backend/src/Squidex.Infrastructure.RabbitMq/CQRS/Events/RabbitMqEventConsumer.cs index 2ba7d18af..6c36c1843 100644 --- a/backend/src/Squidex.Infrastructure.RabbitMq/CQRS/Events/RabbitMqEventConsumer.cs +++ b/backend/src/Squidex.Infrastructure.RabbitMq/CQRS/Events/RabbitMqEventConsumer.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Text; -using System.Threading; -using System.Threading.Tasks; using RabbitMQ.Client; using Squidex.Hosting; using Squidex.Hosting.Configuration; diff --git a/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj b/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj index df49191bc..b937d9740 100644 --- a/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj +++ b/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Infrastructure - 9.0 + 10.0 + enable enable @@ -10,7 +11,7 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Infrastructure.Redis/Squidex.Infrastructure.Redis.csproj b/backend/src/Squidex.Infrastructure.Redis/Squidex.Infrastructure.Redis.csproj index e7f853384..7fcb84452 100644 --- a/backend/src/Squidex.Infrastructure.Redis/Squidex.Infrastructure.Redis.csproj +++ b/backend/src/Squidex.Infrastructure.Redis/Squidex.Infrastructure.Redis.csproj @@ -1,8 +1,9 @@  - net5.0 + net6.0 Squidex.Infrastructure - 7.3 + 10.0 + enable full diff --git a/backend/src/Squidex.Infrastructure/CollectionExtensions.cs b/backend/src/Squidex.Infrastructure/CollectionExtensions.cs index b923093a8..0745450bf 100644 --- a/backend/src/Squidex.Infrastructure/CollectionExtensions.cs +++ b/backend/src/Squidex.Infrastructure/CollectionExtensions.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; namespace Squidex.Infrastructure { diff --git a/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary.cs b/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary.cs index c76359a3b..81c9aa208 100644 --- a/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary.cs +++ b/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; - namespace Squidex.Infrastructure.Collections { public static class ReadonlyDictionary diff --git a/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary{TKey,TValue}.cs b/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary{TKey,TValue}.cs index 511194bb4..5fee1d59c 100644 --- a/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary{TKey,TValue}.cs +++ b/backend/src/Squidex.Infrastructure/Collections/ReadonlyDictionary{TKey,TValue}.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.Collections diff --git a/backend/src/Squidex.Infrastructure/Collections/ReadonlyList.cs b/backend/src/Squidex.Infrastructure/Collections/ReadonlyList.cs index 14ee2bf06..cddcc69ef 100644 --- a/backend/src/Squidex.Infrastructure/Collections/ReadonlyList.cs +++ b/backend/src/Squidex.Infrastructure/Collections/ReadonlyList.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; - namespace Squidex.Infrastructure.Collections { public static class ReadonlyList diff --git a/backend/src/Squidex.Infrastructure/Collections/ReadonlyList{T}.cs b/backend/src/Squidex.Infrastructure/Collections/ReadonlyList{T}.cs index 1407e1db9..223a32d6a 100644 --- a/backend/src/Squidex.Infrastructure/Collections/ReadonlyList{T}.cs +++ b/backend/src/Squidex.Infrastructure/Collections/ReadonlyList{T}.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; namespace Squidex.Infrastructure.Collections diff --git a/backend/src/Squidex.Infrastructure/Commands/CommandExtensions.cs b/backend/src/Squidex.Infrastructure/Commands/CommandExtensions.cs index 4bfa668f7..6cf669749 100644 --- a/backend/src/Squidex.Infrastructure/Commands/CommandExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Commands/CommandExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public static class CommandExtensions diff --git a/backend/src/Squidex.Infrastructure/Commands/CustomCommandMiddlewareRunner.cs b/backend/src/Squidex.Infrastructure/Commands/CustomCommandMiddlewareRunner.cs index f5a126a13..55960870d 100644 --- a/backend/src/Squidex.Infrastructure/Commands/CustomCommandMiddlewareRunner.cs +++ b/backend/src/Squidex.Infrastructure/Commands/CustomCommandMiddlewareRunner.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public sealed class CustomCommandMiddlewareRunner : ICommandMiddleware diff --git a/backend/src/Squidex.Infrastructure/Commands/DomainObject.Execute.cs b/backend/src/Squidex.Infrastructure/Commands/DomainObject.Execute.cs index ccc320381..f3f55b06b 100644 --- a/backend/src/Squidex.Infrastructure/Commands/DomainObject.Execute.cs +++ b/backend/src/Squidex.Infrastructure/Commands/DomainObject.Execute.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public partial class DomainObject diff --git a/backend/src/Squidex.Infrastructure/Commands/DomainObject.cs b/backend/src/Squidex.Infrastructure/Commands/DomainObject.cs index 727e32ec5..ea4b29680 100644 --- a/backend/src/Squidex.Infrastructure/Commands/DomainObject.cs +++ b/backend/src/Squidex.Infrastructure/Commands/DomainObject.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.States; using Squidex.Log; diff --git a/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrain.cs b/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrain.cs index 6747ab8aa..a237a39fe 100644 --- a/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrain.cs +++ b/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrainFormatter.cs b/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrainFormatter.cs index b3897d03d..9cfdf1db1 100644 --- a/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrainFormatter.cs +++ b/backend/src/Squidex.Infrastructure/Commands/DomainObjectGrainFormatter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Orleans; namespace Squidex.Infrastructure.Commands diff --git a/backend/src/Squidex.Infrastructure/Commands/EnrichWithTimestampCommandMiddleware.cs b/backend/src/Squidex.Infrastructure/Commands/EnrichWithTimestampCommandMiddleware.cs index d892fe89b..cdb8f9dbb 100644 --- a/backend/src/Squidex.Infrastructure/Commands/EnrichWithTimestampCommandMiddleware.cs +++ b/backend/src/Squidex.Infrastructure/Commands/EnrichWithTimestampCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using NodaTime; namespace Squidex.Infrastructure.Commands diff --git a/backend/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs b/backend/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs index 8a9b93df0..c74705642 100644 --- a/backend/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs +++ b/backend/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Infrastructure.Commands diff --git a/backend/src/Squidex.Infrastructure/Commands/ICommandBus.cs b/backend/src/Squidex.Infrastructure/Commands/ICommandBus.cs index 4dfd02f6a..f82fa62fd 100644 --- a/backend/src/Squidex.Infrastructure/Commands/ICommandBus.cs +++ b/backend/src/Squidex.Infrastructure/Commands/ICommandBus.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public interface ICommandBus diff --git a/backend/src/Squidex.Infrastructure/Commands/ICommandMiddleware.cs b/backend/src/Squidex.Infrastructure/Commands/ICommandMiddleware.cs index af5870927..0794f48c3 100644 --- a/backend/src/Squidex.Infrastructure/Commands/ICommandMiddleware.cs +++ b/backend/src/Squidex.Infrastructure/Commands/ICommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public delegate Task NextDelegate(CommandContext context); diff --git a/backend/src/Squidex.Infrastructure/Commands/IDomainObjectGrain.cs b/backend/src/Squidex.Infrastructure/Commands/IDomainObjectGrain.cs index 428c57107..faae259da 100644 --- a/backend/src/Squidex.Infrastructure/Commands/IDomainObjectGrain.cs +++ b/backend/src/Squidex.Infrastructure/Commands/IDomainObjectGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs b/backend/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs index 3521834a9..72c3cbf21 100644 --- a/backend/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs +++ b/backend/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Commands { public sealed class InMemoryCommandBus : ICommandBus diff --git a/backend/src/Squidex.Infrastructure/Commands/Is.cs b/backend/src/Squidex.Infrastructure/Commands/Is.cs index 8011b8d68..6ae7c785a 100644 --- a/backend/src/Squidex.Infrastructure/Commands/Is.cs +++ b/backend/src/Squidex.Infrastructure/Commands/Is.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.Commands diff --git a/backend/src/Squidex.Infrastructure/Commands/LogCommandMiddleware.cs b/backend/src/Squidex.Infrastructure/Commands/LogCommandMiddleware.cs index 413540f79..ba72b7bd8 100644 --- a/backend/src/Squidex.Infrastructure/Commands/LogCommandMiddleware.cs +++ b/backend/src/Squidex.Infrastructure/Commands/LogCommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Log; namespace Squidex.Infrastructure.Commands diff --git a/backend/src/Squidex.Infrastructure/Commands/ReadonlyCommandMiddleware.cs b/backend/src/Squidex.Infrastructure/Commands/ReadonlyCommandMiddleware.cs index cbecab9b3..3d9775a6c 100644 --- a/backend/src/Squidex.Infrastructure/Commands/ReadonlyCommandMiddleware.cs +++ b/backend/src/Squidex.Infrastructure/Commands/ReadonlyCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs b/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs index 10ec74518..aa26957b5 100644 --- a/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs +++ b/backend/src/Squidex.Infrastructure/Commands/Rebuilder.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using Microsoft.Extensions.DependencyInjection; using Squidex.Caching; diff --git a/backend/src/Squidex.Infrastructure/Commands/SnapshotList.cs b/backend/src/Squidex.Infrastructure/Commands/SnapshotList.cs index ab770273b..7925baa70 100644 --- a/backend/src/Squidex.Infrastructure/Commands/SnapshotList.cs +++ b/backend/src/Squidex.Infrastructure/Commands/SnapshotList.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; - namespace Squidex.Infrastructure.Commands { public sealed class SnapshotList where T : class, IDomainState, new() diff --git a/backend/src/Squidex.Infrastructure/Diagnostics/GCHealthCheck.cs b/backend/src/Squidex.Infrastructure/Diagnostics/GCHealthCheck.cs index 0e314b815..d15effbeb 100644 --- a/backend/src/Squidex.Infrastructure/Diagnostics/GCHealthCheck.cs +++ b/backend/src/Squidex.Infrastructure/Diagnostics/GCHealthCheck.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Options; diff --git a/backend/src/Squidex.Infrastructure/Diagnostics/OrleansHealthCheck.cs b/backend/src/Squidex.Infrastructure/Diagnostics/OrleansHealthCheck.cs index 670d00bc0..79c8a6027 100644 --- a/backend/src/Squidex.Infrastructure/Diagnostics/OrleansHealthCheck.cs +++ b/backend/src/Squidex.Infrastructure/Diagnostics/OrleansHealthCheck.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; using Orleans; using Orleans.Runtime; diff --git a/backend/src/Squidex.Infrastructure/DisposableObjectBase.cs b/backend/src/Squidex.Infrastructure/DisposableObjectBase.cs index 99da555e8..4464e363b 100644 --- a/backend/src/Squidex.Infrastructure/DisposableObjectBase.cs +++ b/backend/src/Squidex.Infrastructure/DisposableObjectBase.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure { public abstract class DisposableObjectBase : IDisposable diff --git a/backend/src/Squidex.Infrastructure/DomainException.cs b/backend/src/Squidex.Infrastructure/DomainException.cs index 8631deb12..cfe64b85b 100644 --- a/backend/src/Squidex.Infrastructure/DomainException.cs +++ b/backend/src/Squidex.Infrastructure/DomainException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/DomainForbiddenException.cs b/backend/src/Squidex.Infrastructure/DomainForbiddenException.cs index cd4dd2c03..f4ee12997 100644 --- a/backend/src/Squidex.Infrastructure/DomainForbiddenException.cs +++ b/backend/src/Squidex.Infrastructure/DomainForbiddenException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/DomainId.cs b/backend/src/Squidex.Infrastructure/DomainId.cs index 337d186c9..90e83eea6 100644 --- a/backend/src/Squidex.Infrastructure/DomainId.cs +++ b/backend/src/Squidex.Infrastructure/DomainId.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/DomainIdTypeConverter.cs b/backend/src/Squidex.Infrastructure/DomainIdTypeConverter.cs index 3bbce56f8..384da04fd 100644 --- a/backend/src/Squidex.Infrastructure/DomainIdTypeConverter.cs +++ b/backend/src/Squidex.Infrastructure/DomainIdTypeConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Globalization; @@ -13,17 +12,17 @@ namespace Squidex.Infrastructure { public sealed class DomainIdTypeConverter : TypeConverter { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { return sourceType == typeof(string) || sourceType == typeof(Guid); } - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) { return destinationType == typeof(string); } - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { if (value is string text) { @@ -38,9 +37,9 @@ namespace Squidex.Infrastructure return DomainId.Empty; } - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type? destinationType) { - return value.ToString()!; + return value?.ToString()!; } } } diff --git a/backend/src/Squidex.Infrastructure/DomainObjectConflictException.cs b/backend/src/Squidex.Infrastructure/DomainObjectConflictException.cs index 0fea8edbb..2bf6a2b69 100644 --- a/backend/src/Squidex.Infrastructure/DomainObjectConflictException.cs +++ b/backend/src/Squidex.Infrastructure/DomainObjectConflictException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Infrastructure/DomainObjectDeletedException.cs b/backend/src/Squidex.Infrastructure/DomainObjectDeletedException.cs index 687d75b46..15eb90c00 100644 --- a/backend/src/Squidex.Infrastructure/DomainObjectDeletedException.cs +++ b/backend/src/Squidex.Infrastructure/DomainObjectDeletedException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Infrastructure/DomainObjectException.cs b/backend/src/Squidex.Infrastructure/DomainObjectException.cs index 2f47df984..21702ba5a 100644 --- a/backend/src/Squidex.Infrastructure/DomainObjectException.cs +++ b/backend/src/Squidex.Infrastructure/DomainObjectException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/DomainObjectNotFoundException.cs b/backend/src/Squidex.Infrastructure/DomainObjectNotFoundException.cs index 990f4cb22..db3ef36bb 100644 --- a/backend/src/Squidex.Infrastructure/DomainObjectNotFoundException.cs +++ b/backend/src/Squidex.Infrastructure/DomainObjectNotFoundException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Infrastructure/DomainObjectVersionException.cs b/backend/src/Squidex.Infrastructure/DomainObjectVersionException.cs index b42d49737..960839cc0 100644 --- a/backend/src/Squidex.Infrastructure/DomainObjectVersionException.cs +++ b/backend/src/Squidex.Infrastructure/DomainObjectVersionException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; using Squidex.Infrastructure.Translations; diff --git a/backend/src/Squidex.Infrastructure/Email/IEmailSender.cs b/backend/src/Squidex.Infrastructure/Email/IEmailSender.cs index cd282f612..f2a57f250 100644 --- a/backend/src/Squidex.Infrastructure/Email/IEmailSender.cs +++ b/backend/src/Squidex.Infrastructure/Email/IEmailSender.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Email { public interface IEmailSender diff --git a/backend/src/Squidex.Infrastructure/Email/SmtpEmailSender.cs b/backend/src/Squidex.Infrastructure/Email/SmtpEmailSender.cs index eeba45556..5b359b25b 100644 --- a/backend/src/Squidex.Infrastructure/Email/SmtpEmailSender.cs +++ b/backend/src/Squidex.Infrastructure/Email/SmtpEmailSender.cs @@ -6,8 +6,6 @@ // ========================================================================== using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; using MailKit.Net.Smtp; using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.Options; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/DefaultEventDataFormatter.cs b/backend/src/Squidex.Infrastructure/EventSourcing/DefaultEventDataFormatter.cs index 4afdba771..f54eb1193 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/DefaultEventDataFormatter.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/DefaultEventDataFormatter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics; using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Migrations; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Envelope.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Envelope.cs index b5c22b69b..72d19b812 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Envelope.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Envelope.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/EnvelopeExtensions.cs b/backend/src/Squidex.Infrastructure/EventSourcing/EnvelopeExtensions.cs index 885af0758..60090d628 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/EnvelopeExtensions.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/EnvelopeExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using NodaTime; using NodaTime.Text; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/EventCommit.cs b/backend/src/Squidex.Infrastructure/EventSourcing/EventCommit.cs index ff57bbcd1..69a787f64 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/EventCommit.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/EventCommit.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/EventConsumersHealthCheck.cs b/backend/src/Squidex.Infrastructure/EventSourcing/EventConsumersHealthCheck.cs index 7a0a4a012..be346ba9b 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/EventConsumersHealthCheck.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/EventConsumersHealthCheck.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Diagnostics.HealthChecks; using Orleans; using Squidex.Infrastructure.EventSourcing.Grains; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/EventTypeAttribute.cs b/backend/src/Squidex.Infrastructure/EventSourcing/EventTypeAttribute.cs index 3b84d6fe3..af5f23e9f 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/EventTypeAttribute.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/EventTypeAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Reflection; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs index c06ea0c7d..a86927467 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/BatchSubscriber.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading; using System.Threading.Channels; -using System.Threading.Tasks; using Squidex.Infrastructure.Tasks; #pragma warning disable RECS0082 // Parameter has the same name as a member and hides it diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs index 68c9a7834..9313163a1 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Tasks; using Squidex.Log; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerManagerGrain.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerManagerGrain.cs index 6aaedbecb..95c1b9715 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerManagerGrain.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerManagerGrain.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using System.Threading.Tasks; using Orleans; using Orleans.Concurrency; using Orleans.Core; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerState.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerState.cs index 32461ecfc..28c521cfb 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerState.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerState.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Reflection; namespace Squidex.Infrastructure.EventSourcing.Grains diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerGrain.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerGrain.cs index 331fb16a0..ca737c93b 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerGrain.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Orleans; namespace Squidex.Infrastructure.EventSourcing.Grains diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerManagerGrain.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerManagerGrain.cs index 9eac1be84..c5096ed52 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerManagerGrain.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/IEventConsumerManagerGrain.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Orleans.Concurrency; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/OrleansEventNotifier.cs b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/OrleansEventNotifier.cs index 49fc86a26..59b8cb0f1 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/Grains/OrleansEventNotifier.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/Grains/OrleansEventNotifier.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Orleans; using Squidex.Infrastructure.Orleans; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/IEventConsumer.cs b/backend/src/Squidex.Infrastructure/EventSourcing/IEventConsumer.cs index 652a5d83f..2d21220b8 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/IEventConsumer.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/IEventConsumer.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.EventSourcing { public delegate IEventConsumer EventConsumerFactory(string name); diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/IEventDataFormatter.cs b/backend/src/Squidex.Infrastructure/EventSourcing/IEventDataFormatter.cs index ea960d17e..5a7b9deff 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/IEventDataFormatter.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/IEventDataFormatter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.EventSourcing { public interface IEventDataFormatter diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/IEventStore.cs b/backend/src/Squidex.Infrastructure/EventSourcing/IEventStore.cs index b1124c43f..90f9ce77f 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/IEventStore.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/IEventStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using NodaTime; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/IEventSubscriber.cs b/backend/src/Squidex.Infrastructure/EventSourcing/IEventSubscriber.cs index aa2b18cec..ee7bfdc37 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/IEventSubscriber.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/IEventSubscriber.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.EventSourcing { public interface IEventSubscriber diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/PollingSubscription.cs b/backend/src/Squidex.Infrastructure/EventSourcing/PollingSubscription.cs index 98196d1bf..e0adecb02 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/PollingSubscription.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/PollingSubscription.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Timers; diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/RetrySubscription.cs b/backend/src/Squidex.Infrastructure/EventSourcing/RetrySubscription.cs index 2f6f2be4a..545a56761 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/RetrySubscription.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/RetrySubscription.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.EventSourcing { public sealed class RetrySubscription : IEventSubscription, IEventSubscriber diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/StreamFilter.cs b/backend/src/Squidex.Infrastructure/EventSourcing/StreamFilter.cs index 9a343d050..fe394428c 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/StreamFilter.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/StreamFilter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/EventSourcing/WrongEventVersionException.cs b/backend/src/Squidex.Infrastructure/EventSourcing/WrongEventVersionException.cs index 3ffe96a34..4a45984e8 100644 --- a/backend/src/Squidex.Infrastructure/EventSourcing/WrongEventVersionException.cs +++ b/backend/src/Squidex.Infrastructure/EventSourcing/WrongEventVersionException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure.EventSourcing diff --git a/backend/src/Squidex.Infrastructure/ExceptionHelper.cs b/backend/src/Squidex.Infrastructure/ExceptionHelper.cs index f704da03e..65ea120f1 100644 --- a/backend/src/Squidex.Infrastructure/ExceptionHelper.cs +++ b/backend/src/Squidex.Infrastructure/ExceptionHelper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure { public static class ExceptionHelper diff --git a/backend/src/Squidex.Infrastructure/FileExtensions.cs b/backend/src/Squidex.Infrastructure/FileExtensions.cs index b9dce6192..f48527c59 100644 --- a/backend/src/Squidex.Infrastructure/FileExtensions.cs +++ b/backend/src/Squidex.Infrastructure/FileExtensions.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.IO; namespace Squidex.Infrastructure { diff --git a/backend/src/Squidex.Infrastructure/Guard.cs b/backend/src/Squidex.Infrastructure/Guard.cs index a8be5fbc0..06ef832f9 100644 --- a/backend/src/Squidex.Infrastructure/Guard.cs +++ b/backend/src/Squidex.Infrastructure/Guard.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.IO; -using System.Linq; using System.Runtime.CompilerServices; using Squidex.Infrastructure.Validation; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/HashSet.cs b/backend/src/Squidex.Infrastructure/HashSet.cs index c536e28b1..1be05f86f 100644 --- a/backend/src/Squidex.Infrastructure/HashSet.cs +++ b/backend/src/Squidex.Infrastructure/HashSet.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure { public static class HashSet diff --git a/backend/src/Squidex.Infrastructure/Http/DumpFormatter.cs b/backend/src/Squidex.Infrastructure/Http/DumpFormatter.cs index 60e0ac881..16520e19b 100644 --- a/backend/src/Squidex.Infrastructure/Http/DumpFormatter.cs +++ b/backend/src/Squidex.Infrastructure/Http/DumpFormatter.cs @@ -5,9 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; +using System.Globalization; using System.Net; -using System.Net.Http; using System.Net.Http.Headers; using System.Text; @@ -45,7 +44,7 @@ namespace Squidex.Infrastructure.Http { var method = request.Method.ToString().ToUpperInvariant(); - writer.AppendLine($"{method}: {request.RequestUri} HTTP/{request.Version}"); + writer.AppendLine(CultureInfo.InvariantCulture, $"{method}: {request.RequestUri} HTTP/{request.Version}"); writer.AppendHeaders(request.Headers); writer.AppendHeaders(request.Content?.Headers); @@ -64,7 +63,7 @@ namespace Squidex.Infrastructure.Http var responseCode = (int)response.StatusCode; var responseText = Enum.GetName(typeof(HttpStatusCode), response.StatusCode); - writer.AppendLine($"HTTP/{response.Version} {responseCode} {responseText}"); + writer.AppendLine(CultureInfo.InvariantCulture, $"HTTP/{response.Version} {responseCode} {responseText}"); writer.AppendHeaders(response.Headers); writer.AppendHeaders(response.Content?.Headers); @@ -79,12 +78,12 @@ namespace Squidex.Infrastructure.Http if (response != null && elapsed != TimeSpan.Zero) { writer.AppendLine(); - writer.AppendLine($"Elapsed: {elapsed}"); + writer.AppendLine(CultureInfo.InvariantCulture, $"Elapsed: {elapsed}"); } if (isTimeout) { - writer.AppendLine($"Timeout after {elapsed}"); + writer.AppendLine(CultureInfo.InvariantCulture, $"Timeout after {elapsed}"); } } diff --git a/backend/src/Squidex.Infrastructure/IResultList.cs b/backend/src/Squidex.Infrastructure/IResultList.cs index da529155c..05dd7dae3 100644 --- a/backend/src/Squidex.Infrastructure/IResultList.cs +++ b/backend/src/Squidex.Infrastructure/IResultList.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure { public interface IResultList : IReadOnlyList diff --git a/backend/src/Squidex.Infrastructure/Json/ClaimsPrinicpalSurrogate.cs b/backend/src/Squidex.Infrastructure/Json/ClaimsPrinicpalSurrogate.cs index e4c82956c..c76105c46 100644 --- a/backend/src/Squidex.Infrastructure/Json/ClaimsPrinicpalSurrogate.cs +++ b/backend/src/Squidex.Infrastructure/Json/ClaimsPrinicpalSurrogate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Security.Claims; namespace Squidex.Infrastructure.Json diff --git a/backend/src/Squidex.Infrastructure/Json/IJsonSerializer.cs b/backend/src/Squidex.Infrastructure/Json/IJsonSerializer.cs index ba831271d..46fe2ed11 100644 --- a/backend/src/Squidex.Infrastructure/Json/IJsonSerializer.cs +++ b/backend/src/Squidex.Infrastructure/Json/IJsonSerializer.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; - namespace Squidex.Infrastructure.Json { public interface IJsonSerializer diff --git a/backend/src/Squidex.Infrastructure/Json/ISupportedTypes.cs b/backend/src/Squidex.Infrastructure/Json/ISupportedTypes.cs index 38d589471..5c4a4cf64 100644 --- a/backend/src/Squidex.Infrastructure/Json/ISupportedTypes.cs +++ b/backend/src/Squidex.Infrastructure/Json/ISupportedTypes.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - namespace Squidex.Infrastructure.Json { public interface ISupportedTypes diff --git a/backend/src/Squidex.Infrastructure/Json/JsonException.cs b/backend/src/Squidex.Infrastructure/Json/JsonException.cs index 7ba8b2646..1383551e2 100644 --- a/backend/src/Squidex.Infrastructure/Json/JsonException.cs +++ b/backend/src/Squidex.Infrastructure/Json/JsonException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure.Json diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/ConverterContractResolver.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/ConverterContractResolver.cs index 2250f3886..3c3fe0e76 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/ConverterContractResolver.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/ConverterContractResolver.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/EnvelopeHeadersConverter.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/EnvelopeHeadersConverter.cs index a056b4f82..8457bfe11 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/EnvelopeHeadersConverter.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/EnvelopeHeadersConverter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Newtonsoft.Json; using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonClassConverter.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonClassConverter.cs index 150243f34..1d8a7b5a7 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonClassConverter.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonClassConverter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Newtonsoft.Json; namespace Squidex.Infrastructure.Json.Newtonsoft diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonValueConverter.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonValueConverter.cs index 83f8f1e9c..6564c4a9f 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonValueConverter.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/JsonValueConverter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Newtonsoft.Json; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/NewtonsoftJsonSerializer.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/NewtonsoftJsonSerializer.cs index 94eac432b..7c777ad80 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/NewtonsoftJsonSerializer.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/NewtonsoftJsonSerializer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using Newtonsoft.Json; using NewtonsoftException = Newtonsoft.Json.JsonException; diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/SurrogateConverter.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/SurrogateConverter.cs index a23c51420..1035fc666 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/SurrogateConverter.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/SurrogateConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Newtonsoft.Json; namespace Squidex.Infrastructure.Json.Newtonsoft diff --git a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/TypeNameSerializationBinder.cs b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/TypeNameSerializationBinder.cs index 00dabb905..0060f1bfe 100644 --- a/backend/src/Squidex.Infrastructure/Json/Newtonsoft/TypeNameSerializationBinder.cs +++ b/backend/src/Squidex.Infrastructure/Json/Newtonsoft/TypeNameSerializationBinder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Newtonsoft.Json.Serialization; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/IJsonValue.cs b/backend/src/Squidex.Infrastructure/Json/Objects/IJsonValue.cs index deb5fdb4d..c47942ae1 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/IJsonValue.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/IJsonValue.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.Json.Objects diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/JsonArray.cs b/backend/src/Squidex.Infrastructure/Json/Objects/JsonArray.cs index 2f8ebda37..9b8a09808 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/JsonArray.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/JsonArray.cs @@ -5,12 +5,9 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Linq; namespace Squidex.Infrastructure.Json.Objects { diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/JsonNull.cs b/backend/src/Squidex.Infrastructure/Json/Objects/JsonNull.cs index 9774b1536..a1e02d040 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/JsonNull.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/JsonNull.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.Json.Objects diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/JsonObject.cs b/backend/src/Squidex.Infrastructure/Json/Objects/JsonObject.cs index 29efdcc3c..462badcea 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/JsonObject.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/JsonObject.cs @@ -5,11 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; namespace Squidex.Infrastructure.Json.Objects { diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/JsonScalar.cs b/backend/src/Squidex.Infrastructure/Json/Objects/JsonScalar.cs index 0044ab666..500a8b6cc 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/JsonScalar.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/JsonScalar.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; namespace Squidex.Infrastructure.Json.Objects diff --git a/backend/src/Squidex.Infrastructure/Json/Objects/JsonValue.cs b/backend/src/Squidex.Infrastructure/Json/Objects/JsonValue.cs index ba1bc9dc0..dd9d6de8e 100644 --- a/backend/src/Squidex.Infrastructure/Json/Objects/JsonValue.cs +++ b/backend/src/Squidex.Infrastructure/Json/Objects/JsonValue.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Linq; using NodaTime; #pragma warning disable RECS0018 // Comparison of floating point numbers with equality operator diff --git a/backend/src/Squidex.Infrastructure/Language.cs b/backend/src/Squidex.Infrastructure/Language.cs index 7b1d290c2..5f1ef0562 100644 --- a/backend/src/Squidex.Infrastructure/Language.cs +++ b/backend/src/Squidex.Infrastructure/Language.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; diff --git a/backend/src/Squidex.Infrastructure/LanguageTypeConverter.cs b/backend/src/Squidex.Infrastructure/LanguageTypeConverter.cs index 5a6714d6b..dcd02664c 100644 --- a/backend/src/Squidex.Infrastructure/LanguageTypeConverter.cs +++ b/backend/src/Squidex.Infrastructure/LanguageTypeConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Globalization; @@ -13,24 +12,24 @@ namespace Squidex.Infrastructure { public sealed class LanguageTypeConverter : TypeConverter { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { return sourceType == typeof(string); } - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) { return destinationType == typeof(string); } - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { return Language.GetLanguage((string)value); } - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type? destinationType) { - return ((Language)value).Iso2Code; + return ((Language)value!).Iso2Code; } } } diff --git a/backend/src/Squidex.Infrastructure/LanguagesInitializer.cs b/backend/src/Squidex.Infrastructure/LanguagesInitializer.cs index f97284491..4c0eacccd 100644 --- a/backend/src/Squidex.Infrastructure/LanguagesInitializer.cs +++ b/backend/src/Squidex.Infrastructure/LanguagesInitializer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Hosting; diff --git a/backend/src/Squidex.Infrastructure/LanguagesOptions.cs b/backend/src/Squidex.Infrastructure/LanguagesOptions.cs index 7a7e66ce3..4cb1630da 100644 --- a/backend/src/Squidex.Infrastructure/LanguagesOptions.cs +++ b/backend/src/Squidex.Infrastructure/LanguagesOptions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure { public sealed class LanguagesOptions : Dictionary diff --git a/backend/src/Squidex.Infrastructure/Log/BackgroundRequestLogStore.cs b/backend/src/Squidex.Infrastructure/Log/BackgroundRequestLogStore.cs index 6e5452f94..931668ebd 100644 --- a/backend/src/Squidex.Infrastructure/Log/BackgroundRequestLogStore.cs +++ b/backend/src/Squidex.Infrastructure/Log/BackgroundRequestLogStore.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Infrastructure.Timers; using Squidex.Log; diff --git a/backend/src/Squidex.Infrastructure/Log/IRequestLogRepository.cs b/backend/src/Squidex.Infrastructure/Log/IRequestLogRepository.cs index 4fd44f53f..04cfc60bd 100644 --- a/backend/src/Squidex.Infrastructure/Log/IRequestLogRepository.cs +++ b/backend/src/Squidex.Infrastructure/Log/IRequestLogRepository.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Log { public interface IRequestLogRepository diff --git a/backend/src/Squidex.Infrastructure/Log/IRequestLogStore.cs b/backend/src/Squidex.Infrastructure/Log/IRequestLogStore.cs index 00310db98..347cc73c3 100644 --- a/backend/src/Squidex.Infrastructure/Log/IRequestLogStore.cs +++ b/backend/src/Squidex.Infrastructure/Log/IRequestLogStore.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Log { public interface IRequestLogStore diff --git a/backend/src/Squidex.Infrastructure/Log/Request.cs b/backend/src/Squidex.Infrastructure/Log/Request.cs index 6b2d2d4e8..d53e7e0ad 100644 --- a/backend/src/Squidex.Infrastructure/Log/Request.cs +++ b/backend/src/Squidex.Infrastructure/Log/Request.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using NodaTime; #pragma warning disable SA1401 // Fields should be private diff --git a/backend/src/Squidex.Infrastructure/Migrations/IMigration.cs b/backend/src/Squidex.Infrastructure/Migrations/IMigration.cs index 754cd8558..7d8550b55 100644 --- a/backend/src/Squidex.Infrastructure/Migrations/IMigration.cs +++ b/backend/src/Squidex.Infrastructure/Migrations/IMigration.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Migrations { public interface IMigration diff --git a/backend/src/Squidex.Infrastructure/Migrations/IMigrationPath.cs b/backend/src/Squidex.Infrastructure/Migrations/IMigrationPath.cs index b714bbacb..03552736c 100644 --- a/backend/src/Squidex.Infrastructure/Migrations/IMigrationPath.cs +++ b/backend/src/Squidex.Infrastructure/Migrations/IMigrationPath.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.Migrations { public interface IMigrationPath diff --git a/backend/src/Squidex.Infrastructure/Migrations/IMigrationStatus.cs b/backend/src/Squidex.Infrastructure/Migrations/IMigrationStatus.cs index e004f23c3..096705f1f 100644 --- a/backend/src/Squidex.Infrastructure/Migrations/IMigrationStatus.cs +++ b/backend/src/Squidex.Infrastructure/Migrations/IMigrationStatus.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Migrations { public interface IMigrationStatus diff --git a/backend/src/Squidex.Infrastructure/Migrations/MigrationFailedException.cs b/backend/src/Squidex.Infrastructure/Migrations/MigrationFailedException.cs index 1a53d0be8..93af105a0 100644 --- a/backend/src/Squidex.Infrastructure/Migrations/MigrationFailedException.cs +++ b/backend/src/Squidex.Infrastructure/Migrations/MigrationFailedException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure.Migrations diff --git a/backend/src/Squidex.Infrastructure/Migrations/Migrator.cs b/backend/src/Squidex.Infrastructure/Migrations/Migrator.cs index 77ee147c0..658b4c708 100644 --- a/backend/src/Squidex.Infrastructure/Migrations/Migrator.cs +++ b/backend/src/Squidex.Infrastructure/Migrations/Migrator.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Log; namespace Squidex.Infrastructure.Migrations diff --git a/backend/src/Squidex.Infrastructure/NamedIdTypeConverter.cs b/backend/src/Squidex.Infrastructure/NamedIdTypeConverter.cs index 864e7f46c..7e814def3 100644 --- a/backend/src/Squidex.Infrastructure/NamedIdTypeConverter.cs +++ b/backend/src/Squidex.Infrastructure/NamedIdTypeConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Globalization; @@ -41,17 +40,17 @@ namespace Squidex.Infrastructure } } - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { return sourceType == typeof(string); } - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) { return destinationType == typeof(string); } - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { if (converter == null) { @@ -61,9 +60,9 @@ namespace Squidex.Infrastructure return converter((string)value); } - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type? destinationType) { - return value.ToString()!; + return value?.ToString()!; } private static bool ParseDomainId(ReadOnlySpan value, out DomainId result) diff --git a/backend/src/Squidex.Infrastructure/NamedId{T}.cs b/backend/src/Squidex.Infrastructure/NamedId{T}.cs index 66062a641..57bee14bf 100644 --- a/backend/src/Squidex.Infrastructure/NamedId{T}.cs +++ b/backend/src/Squidex.Infrastructure/NamedId{T}.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; @@ -47,7 +46,7 @@ namespace Squidex.Infrastructure { if (value.Length > GuidLength + 1 && value[GuidLength] == ',') { - if (parser(span.Slice(0, GuidLength), out var id)) + if (parser(span[..GuidLength], out var id)) { result = new NamedId(id, value[(GuidLength + 1)..]); @@ -61,7 +60,7 @@ namespace Squidex.Infrastructure if (index > 0 && index < value.Length - 1) { - if (parser(span.Slice(0, index), out var id)) + if (parser(span[..index], out var id)) { result = new NamedId(id, value[(index + 1)..]); diff --git a/backend/src/Squidex.Infrastructure/Net/IPAddressComparer.cs b/backend/src/Squidex.Infrastructure/Net/IPAddressComparer.cs index fd8a11c98..496137d96 100644 --- a/backend/src/Squidex.Infrastructure/Net/IPAddressComparer.cs +++ b/backend/src/Squidex.Infrastructure/Net/IPAddressComparer.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Net; namespace Squidex.Infrastructure.Net diff --git a/backend/src/Squidex.Infrastructure/None.cs b/backend/src/Squidex.Infrastructure/None.cs index ce9781f25..d330364ec 100644 --- a/backend/src/Squidex.Infrastructure/None.cs +++ b/backend/src/Squidex.Infrastructure/None.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure { public sealed record None diff --git a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimit.cs b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimit.cs index 38f1bb17f..f614b4cb2 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimit.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimit.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Orleans; using Orleans.Runtime; diff --git a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiter.cs b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiter.cs index 0d2367c0f..78061baad 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiter.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Threading; using Squidex.Caching; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiterFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiterFilter.cs index 5566f3003..5e712e9ee 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiterFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/ActivationLimiterFilter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/CultureFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/CultureFilter.cs index f5fdb93d8..8f5bf2a9d 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/CultureFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/CultureFilter.cs @@ -6,7 +6,6 @@ // ========================================================================== using System.Globalization; -using System.Threading.Tasks; using Orleans; using Orleans.Runtime; diff --git a/backend/src/Squidex.Infrastructure/Orleans/ExceptionWrapperFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/ExceptionWrapperFilter.cs index be53ab4ce..5f93daa58 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/ExceptionWrapperFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/ExceptionWrapperFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Orleans; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/GrainBase.cs b/backend/src/Squidex.Infrastructure/Orleans/GrainBase.cs index e8b940255..6279d52ae 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/GrainBase.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/GrainBase.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.Extensions.DependencyInjection; using Orleans; using Orleans.Core; diff --git a/backend/src/Squidex.Infrastructure/Orleans/GrainBootstrap.cs b/backend/src/Squidex.Infrastructure/Orleans/GrainBootstrap.cs index f4d9264cd..e082e3093 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/GrainBootstrap.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/GrainBootstrap.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; -using System.Threading.Tasks; using Orleans; using Orleans.Runtime; using Squidex.Hosting; diff --git a/backend/src/Squidex.Infrastructure/Orleans/GrainOfString.cs b/backend/src/Squidex.Infrastructure/Orleans/GrainOfString.cs index eba584a04..54e8506f5 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/GrainOfString.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/GrainOfString.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Orleans.Core; using Orleans.Runtime; diff --git a/backend/src/Squidex.Infrastructure/Orleans/GrainState.cs b/backend/src/Squidex.Infrastructure/Orleans/GrainState.cs index 04ecf552b..786acc6af 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/GrainState.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/GrainState.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Orleans; using Orleans.Runtime; diff --git a/backend/src/Squidex.Infrastructure/Orleans/IActivationLimit.cs b/backend/src/Squidex.Infrastructure/Orleans/IActivationLimit.cs index 44d88f4ac..f5e0a3071 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/IActivationLimit.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/IActivationLimit.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Orleans { public interface IActivationLimit diff --git a/backend/src/Squidex.Infrastructure/Orleans/IActivationLimiter.cs b/backend/src/Squidex.Infrastructure/Orleans/IActivationLimiter.cs index 160f95551..1ba19ceb2 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/IActivationLimiter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/IActivationLimiter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Orleans { public interface IActivationLimiter diff --git a/backend/src/Squidex.Infrastructure/Orleans/IBackgroundGrain.cs b/backend/src/Squidex.Infrastructure/Orleans/IBackgroundGrain.cs index e30295b8a..8b3d2fc13 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/IBackgroundGrain.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/IBackgroundGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/IGrainState.cs b/backend/src/Squidex.Infrastructure/Orleans/IGrainState.cs index 5dda5fa71..19933e853 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/IGrainState.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/IGrainState.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/Indexes/IUniqueNameGrain.cs b/backend/src/Squidex.Infrastructure/Orleans/Indexes/IUniqueNameGrain.cs index 148342f13..7c9b03a37 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/Indexes/IUniqueNameGrain.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/Indexes/IUniqueNameGrain.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; namespace Squidex.Infrastructure.Orleans.Indexes diff --git a/backend/src/Squidex.Infrastructure/Orleans/Indexes/UniqueNameGrain.cs b/backend/src/Squidex.Infrastructure/Orleans/Indexes/UniqueNameGrain.cs index e0afbcb43..49b08847b 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/Indexes/UniqueNameGrain.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/Indexes/UniqueNameGrain.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Orleans.Indexes { public class UniqueNameGrain : GrainOfString, IUniqueNameGrain diff --git a/backend/src/Squidex.Infrastructure/Orleans/J.cs b/backend/src/Squidex.Infrastructure/Orleans/J.cs index 630dad17d..4238e8c63 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/J.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/J.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.Json; #pragma warning disable SA1401 // Fields must be private diff --git a/backend/src/Squidex.Infrastructure/Orleans/J{T}.cs b/backend/src/Squidex.Infrastructure/Orleans/J{T}.cs index e19fbd48a..389ac3d99 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/J{T}.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/J{T}.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Orleans.CodeGeneration; using Orleans.Concurrency; diff --git a/backend/src/Squidex.Infrastructure/Orleans/LocalCacheFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/LocalCacheFilter.cs index 8ef6e31d7..428d7bc87 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/LocalCacheFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/LocalCacheFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Orleans; using Squidex.Caching; diff --git a/backend/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs index d9944edc9..d38ad71f0 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Orleans; using Squidex.Log; diff --git a/backend/src/Squidex.Infrastructure/Orleans/OrleansWrapperException.cs b/backend/src/Squidex.Infrastructure/Orleans/OrleansWrapperException.cs index a0f7612bd..5b7228fdc 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/OrleansWrapperException.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/OrleansWrapperException.cs @@ -5,7 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; +using System.Globalization; using System.Runtime.Serialization; using System.Text; @@ -39,7 +39,7 @@ namespace Squidex.Infrastructure.Orleans { var sb = new StringBuilder(); - sb.AppendLine($"Wrapping exception of type {exceptionType}, because original exception is not serialized."); + sb.AppendLine(CultureInfo.InvariantCulture, $"Wrapping exception of type {exceptionType}, because original exception is not serialized."); sb.AppendLine(); sb.AppendLine("Original exception:"); sb.AppendLine(wrapped.ToString()); diff --git a/backend/src/Squidex.Infrastructure/Orleans/StateFilter.cs b/backend/src/Squidex.Infrastructure/Orleans/StateFilter.cs index 73a2e69e1..bfba64dcb 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/StateFilter.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/StateFilter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Orleans; using Orleans.Runtime; using Squidex.Infrastructure.EventSourcing; diff --git a/backend/src/Squidex.Infrastructure/Orleans/StreamReaderWrapper.cs b/backend/src/Squidex.Infrastructure/Orleans/StreamReaderWrapper.cs index f4f981062..2806bf269 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/StreamReaderWrapper.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/StreamReaderWrapper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using Orleans.Serialization; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Orleans/StreamWriterWrapper.cs b/backend/src/Squidex.Infrastructure/Orleans/StreamWriterWrapper.cs index 6fdd2f18b..6a2385d5c 100644 --- a/backend/src/Squidex.Infrastructure/Orleans/StreamWriterWrapper.cs +++ b/backend/src/Squidex.Infrastructure/Orleans/StreamWriterWrapper.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; using Orleans.Serialization; namespace Squidex.Infrastructure.Orleans diff --git a/backend/src/Squidex.Infrastructure/Plugins/PluginLoaders.cs b/backend/src/Squidex.Infrastructure/Plugins/PluginLoaders.cs index cc39ca3b7..3f0b4f382 100644 --- a/backend/src/Squidex.Infrastructure/Plugins/PluginLoaders.cs +++ b/backend/src/Squidex.Infrastructure/Plugins/PluginLoaders.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.IO; using System.Reflection; using McMaster.NETCore.Plugins; diff --git a/backend/src/Squidex.Infrastructure/Plugins/PluginManager.cs b/backend/src/Squidex.Infrastructure/Plugins/PluginManager.cs index 5a8ceb33f..923504bc0 100644 --- a/backend/src/Squidex.Infrastructure/Plugins/PluginManager.cs +++ b/backend/src/Squidex.Infrastructure/Plugins/PluginManager.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Reflection; using McMaster.NETCore.Plugins; using Microsoft.Extensions.Configuration; diff --git a/backend/src/Squidex.Infrastructure/Queries/AsyncTransformVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/AsyncTransformVisitor.cs index 22d5fd540..9f4916152 100644 --- a/backend/src/Squidex.Infrastructure/Queries/AsyncTransformVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/AsyncTransformVisitor.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Queries { public abstract class AsyncTransformVisitor : FilterNodeVisitor?>, TValue, TArgs> diff --git a/backend/src/Squidex.Infrastructure/Queries/ClrFilter.cs b/backend/src/Squidex.Infrastructure/Queries/ClrFilter.cs index 9f07840bb..685e99fb4 100644 --- a/backend/src/Squidex.Infrastructure/Queries/ClrFilter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/ClrFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public static class ClrFilter diff --git a/backend/src/Squidex.Infrastructure/Queries/ClrValue.cs b/backend/src/Squidex.Infrastructure/Queries/ClrValue.cs index 6ceddd45e..0993a4faf 100644 --- a/backend/src/Squidex.Infrastructure/Queries/ClrValue.cs +++ b/backend/src/Squidex.Infrastructure/Queries/ClrValue.cs @@ -5,11 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using NodaTime; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter diff --git a/backend/src/Squidex.Infrastructure/Queries/CompareFilter.cs b/backend/src/Squidex.Infrastructure/Queries/CompareFilter.cs index 5edc11ea3..a66469ca2 100644 --- a/backend/src/Squidex.Infrastructure/Queries/CompareFilter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/CompareFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/FilterNode.cs b/backend/src/Squidex.Infrastructure/Queries/FilterNode.cs index ffb1db252..f87c92484 100644 --- a/backend/src/Squidex.Infrastructure/Queries/FilterNode.cs +++ b/backend/src/Squidex.Infrastructure/Queries/FilterNode.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public abstract record FilterNode diff --git a/backend/src/Squidex.Infrastructure/Queries/FilterNodeVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/FilterNodeVisitor.cs index b5b5a68cf..209c9091f 100644 --- a/backend/src/Squidex.Infrastructure/Queries/FilterNodeVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/FilterNodeVisitor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - #pragma warning disable RECS0083 // Shows NotImplementedException throws in the quick task bar namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterSurrogate.cs b/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterSurrogate.cs index fcb7c4b5a..4ec47efb4 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterSurrogate.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterSurrogate.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterVisitor.cs index d15e73af1..8fa15407b 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/JsonFilterVisitor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using NJsonSchema; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/OperatorValidator.cs b/backend/src/Squidex.Infrastructure/Queries/Json/OperatorValidator.cs index 14224b39f..6aa9d4446 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/OperatorValidator.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/OperatorValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using NJsonSchema; using Squidex.Infrastructure.Json; diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/PropertyPathValidator.cs b/backend/src/Squidex.Infrastructure/Queries/Json/PropertyPathValidator.cs index 855af6232..cbef8fc7a 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/PropertyPathValidator.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/PropertyPathValidator.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using NJsonSchema; diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/QueryParser.cs b/backend/src/Squidex.Infrastructure/Queries/Json/QueryParser.cs index f6f824f12..52a740e1b 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/QueryParser.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/QueryParser.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using NJsonSchema; using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex.Infrastructure/Queries/Json/ValueConverter.cs b/backend/src/Squidex.Infrastructure/Queries/Json/ValueConverter.cs index c1146862c..52bf13a2b 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Json/ValueConverter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Json/ValueConverter.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using NJsonSchema; using NodaTime; using NodaTime.Text; diff --git a/backend/src/Squidex.Infrastructure/Queries/LogicalFilter.cs b/backend/src/Squidex.Infrastructure/Queries/LogicalFilter.cs index 314b3206c..3b7f4e2c1 100644 --- a/backend/src/Squidex.Infrastructure/Queries/LogicalFilter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/LogicalFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/NegateFilter.cs b/backend/src/Squidex.Infrastructure/Queries/NegateFilter.cs index 69f969e6b..baa68dce4 100644 --- a/backend/src/Squidex.Infrastructure/Queries/NegateFilter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/NegateFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/OData/ConstantWithTypeVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/OData/ConstantWithTypeVisitor.cs index 2f29ebd7a..176a7cfa6 100644 --- a/backend/src/Squidex.Infrastructure/Queries/OData/ConstantWithTypeVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/OData/ConstantWithTypeVisitor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Microsoft.OData; using Microsoft.OData.Edm; using Microsoft.OData.UriParser; diff --git a/backend/src/Squidex.Infrastructure/Queries/OData/EdmModelExtensions.cs b/backend/src/Squidex.Infrastructure/Queries/OData/EdmModelExtensions.cs index 969be15fc..64e68c192 100644 --- a/backend/src/Squidex.Infrastructure/Queries/OData/EdmModelExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Queries/OData/EdmModelExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Microsoft.OData.Edm; using Microsoft.OData.UriParser; diff --git a/backend/src/Squidex.Infrastructure/Queries/OData/FilterVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/OData/FilterVisitor.cs index 79a02af27..57fe7465d 100644 --- a/backend/src/Squidex.Infrastructure/Queries/OData/FilterVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/OData/FilterVisitor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Microsoft.OData.UriParser; using Microsoft.Spatial; diff --git a/backend/src/Squidex.Infrastructure/Queries/OData/SearchTermVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/OData/SearchTermVisitor.cs index f3fd8ae30..da97f869c 100644 --- a/backend/src/Squidex.Infrastructure/Queries/OData/SearchTermVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/OData/SearchTermVisitor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.OData.UriParser; namespace Squidex.Infrastructure.Queries.OData diff --git a/backend/src/Squidex.Infrastructure/Queries/Optimizer.cs b/backend/src/Squidex.Infrastructure/Queries/Optimizer.cs index 4d3024082..a98898edd 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Optimizer.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Optimizer.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public sealed class Optimizer : TransformVisitor diff --git a/backend/src/Squidex.Infrastructure/Queries/PascalCasePathConverter.cs b/backend/src/Squidex.Infrastructure/Queries/PascalCasePathConverter.cs index 8fca25cc7..e098aa29f 100644 --- a/backend/src/Squidex.Infrastructure/Queries/PascalCasePathConverter.cs +++ b/backend/src/Squidex.Infrastructure/Queries/PascalCasePathConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Text; namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/PropertyPath.cs b/backend/src/Squidex.Infrastructure/Queries/PropertyPath.cs index acbb60a3f..d79a9c9ab 100644 --- a/backend/src/Squidex.Infrastructure/Queries/PropertyPath.cs +++ b/backend/src/Squidex.Infrastructure/Queries/PropertyPath.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Collections; namespace Squidex.Infrastructure.Queries diff --git a/backend/src/Squidex.Infrastructure/Queries/Query.cs b/backend/src/Squidex.Infrastructure/Queries/Query.cs index a759f2c2e..e3c9e0121 100644 --- a/backend/src/Squidex.Infrastructure/Queries/Query.cs +++ b/backend/src/Squidex.Infrastructure/Queries/Query.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public class Query diff --git a/backend/src/Squidex.Infrastructure/Queries/QueryExtensions.cs b/backend/src/Squidex.Infrastructure/Queries/QueryExtensions.cs index 7025ad063..31a277ec3 100644 --- a/backend/src/Squidex.Infrastructure/Queries/QueryExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Queries/QueryExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public static class QueryExtensions diff --git a/backend/src/Squidex.Infrastructure/Queries/SortBuilder.cs b/backend/src/Squidex.Infrastructure/Queries/SortBuilder.cs index 02c1aca16..2f3346bb1 100644 --- a/backend/src/Squidex.Infrastructure/Queries/SortBuilder.cs +++ b/backend/src/Squidex.Infrastructure/Queries/SortBuilder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; - namespace Squidex.Infrastructure.Queries { public static class SortBuilder diff --git a/backend/src/Squidex.Infrastructure/Queries/TransformVisitor.cs b/backend/src/Squidex.Infrastructure/Queries/TransformVisitor.cs index 5f72ccf27..41be68c80 100644 --- a/backend/src/Squidex.Infrastructure/Queries/TransformVisitor.cs +++ b/backend/src/Squidex.Infrastructure/Queries/TransformVisitor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.Queries { public abstract class TransformVisitor : FilterNodeVisitor?, TValue, TArgs> diff --git a/backend/src/Squidex.Infrastructure/RandomHash.cs b/backend/src/Squidex.Infrastructure/RandomHash.cs index 1d5dd2a63..868c7d2b4 100644 --- a/backend/src/Squidex.Infrastructure/RandomHash.cs +++ b/backend/src/Squidex.Infrastructure/RandomHash.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Security.Cryptography; using System.Text; diff --git a/backend/src/Squidex.Infrastructure/RefToken.cs b/backend/src/Squidex.Infrastructure/RefToken.cs index d9bfe137b..717e7d8b4 100644 --- a/backend/src/Squidex.Infrastructure/RefToken.cs +++ b/backend/src/Squidex.Infrastructure/RefToken.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; @@ -70,7 +69,7 @@ namespace Squidex.Infrastructure if (idx > 0 && idx < value.Length - 1) { - if (!Enum.TryParse(value.Substring(0, idx), true, out var type)) + if (!Enum.TryParse(value[..idx], true, out var type)) { type = RefTokenType.Subject; } diff --git a/backend/src/Squidex.Infrastructure/RefTokenTypeConverter.cs b/backend/src/Squidex.Infrastructure/RefTokenTypeConverter.cs index 92e8f698b..779d4fe7c 100644 --- a/backend/src/Squidex.Infrastructure/RefTokenTypeConverter.cs +++ b/backend/src/Squidex.Infrastructure/RefTokenTypeConverter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel; using System.Globalization; @@ -13,24 +12,24 @@ namespace Squidex.Infrastructure { public sealed class RefTokenTypeConverter : TypeConverter { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { return sourceType == typeof(string); } - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) { return destinationType == typeof(string); } - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { return RefToken.Parse((string)value); } - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type? destinationType) { - return value.ToString()!; + return value?.ToString()!; } } } diff --git a/backend/src/Squidex.Infrastructure/Reflection/IgnoreEqualsAttribute.cs b/backend/src/Squidex.Infrastructure/Reflection/IgnoreEqualsAttribute.cs index 967360e4e..63463a676 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/IgnoreEqualsAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/IgnoreEqualsAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Reflection { [AttributeUsage(AttributeTargets.Property)] diff --git a/backend/src/Squidex.Infrastructure/Reflection/Internal/PropertyAccessor.cs b/backend/src/Squidex.Infrastructure/Reflection/Internal/PropertyAccessor.cs index 1429af765..5727bd43f 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/Internal/PropertyAccessor.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/Internal/PropertyAccessor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Reflection; namespace Squidex.Infrastructure.Reflection.Internal diff --git a/backend/src/Squidex.Infrastructure/Reflection/Internal/ReflectionExtensions.cs b/backend/src/Squidex.Infrastructure/Reflection/Internal/ReflectionExtensions.cs index ee670bdfb..1432535b0 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/Internal/ReflectionExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/Internal/ReflectionExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; namespace Squidex.Infrastructure.Reflection.Internal diff --git a/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs b/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs index 554054f23..dc1e1190b 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/SimpleMapper.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using Squidex.Infrastructure.Reflection.Internal; #pragma warning disable RECS0108 // Warns about static fields in generic types diff --git a/backend/src/Squidex.Infrastructure/Reflection/TypeNameAttribute.cs b/backend/src/Squidex.Infrastructure/Reflection/TypeNameAttribute.cs index a4e4be9ef..06247e059 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/TypeNameAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/TypeNameAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Reflection { [AttributeUsage(AttributeTargets.Class, Inherited = false)] diff --git a/backend/src/Squidex.Infrastructure/Reflection/TypeNameBuilder.cs b/backend/src/Squidex.Infrastructure/Reflection/TypeNameBuilder.cs index 79612da42..2f695470c 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/TypeNameBuilder.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/TypeNameBuilder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Text; namespace Squidex.Infrastructure.Reflection @@ -22,7 +21,7 @@ namespace Squidex.Infrastructure.Reflection { if (typeName.EndsWith(suffix, StringComparison.Ordinal)) { - typeName = typeName.Substring(0, typeName.Length - suffix.Length); + typeName = typeName[..^suffix.Length]; break; } diff --git a/backend/src/Squidex.Infrastructure/Reflection/TypeNameNotFoundException.cs b/backend/src/Squidex.Infrastructure/Reflection/TypeNameNotFoundException.cs index d606e90c7..f6648df40 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/TypeNameNotFoundException.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/TypeNameNotFoundException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure.Reflection diff --git a/backend/src/Squidex.Infrastructure/Reflection/TypeNameRegistry.cs b/backend/src/Squidex.Infrastructure/Reflection/TypeNameRegistry.cs index 0254204eb..bac7114b7 100644 --- a/backend/src/Squidex.Infrastructure/Reflection/TypeNameRegistry.cs +++ b/backend/src/Squidex.Infrastructure/Reflection/TypeNameRegistry.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Reflection; namespace Squidex.Infrastructure.Reflection diff --git a/backend/src/Squidex.Infrastructure/ResultList.cs b/backend/src/Squidex.Infrastructure/ResultList.cs index 8a40cdfea..2585d9fe4 100644 --- a/backend/src/Squidex.Infrastructure/ResultList.cs +++ b/backend/src/Squidex.Infrastructure/ResultList.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure { public static class ResultList diff --git a/backend/src/Squidex.Infrastructure/RetryWindow.cs b/backend/src/Squidex.Infrastructure/RetryWindow.cs index 3f3dd9d16..ded4f7cf3 100644 --- a/backend/src/Squidex.Infrastructure/RetryWindow.cs +++ b/backend/src/Squidex.Infrastructure/RetryWindow.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/Security/Extensions.cs b/backend/src/Squidex.Infrastructure/Security/Extensions.cs index 332f202ba..0a0e6e907 100644 --- a/backend/src/Squidex.Infrastructure/Security/Extensions.cs +++ b/backend/src/Squidex.Infrastructure/Security/Extensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Security.Claims; namespace Squidex.Infrastructure.Security diff --git a/backend/src/Squidex.Infrastructure/Security/Permission.Part.cs b/backend/src/Squidex.Infrastructure/Security/Permission.Part.cs index 5dcb2341e..e39edeff2 100644 --- a/backend/src/Squidex.Infrastructure/Security/Permission.Part.cs +++ b/backend/src/Squidex.Infrastructure/Security/Permission.Part.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Security { public sealed partial class Permission @@ -51,7 +49,7 @@ namespace Squidex.Infrastructure.Security { if (currentSpan[i] == SeparatorMain) { - result[j] = Parse(current.Slice(0, i)); + result[j] = Parse(current[..i]); current = current[(i + 1)..]; currentSpan = current.Span; @@ -107,7 +105,7 @@ namespace Squidex.Infrastructure.Security { if (currentSpan[i] == SeparatorAlternative) { - alternatives[j] = current.Slice(0, i); + alternatives[j] = current[..i]; current = current[(i + 1)..]; currentSpan = current.Span; diff --git a/backend/src/Squidex.Infrastructure/Security/Permission.cs b/backend/src/Squidex.Infrastructure/Security/Permission.cs index dda5b32f6..c28b1ea3e 100644 --- a/backend/src/Squidex.Infrastructure/Security/Permission.cs +++ b/backend/src/Squidex.Infrastructure/Security/Permission.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.Security { public sealed partial class Permission : IComparable, IEquatable diff --git a/backend/src/Squidex.Infrastructure/Security/PermissionSet.cs b/backend/src/Squidex.Infrastructure/Security/PermissionSet.cs index 30222fe5f..714e84b78 100644 --- a/backend/src/Squidex.Infrastructure/Security/PermissionSet.cs +++ b/backend/src/Squidex.Infrastructure/Security/PermissionSet.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Collections; namespace Squidex.Infrastructure.Security diff --git a/backend/src/Squidex.Infrastructure/Singletons.cs b/backend/src/Squidex.Infrastructure/Singletons.cs index 4474eedda..a86099af9 100644 --- a/backend/src/Squidex.Infrastructure/Singletons.cs +++ b/backend/src/Squidex.Infrastructure/Singletons.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj index c4e3866a3..98bea9307 100644 --- a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj +++ b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -10,40 +11,40 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + all runtime; build; native; contentfiles; analyzers - - + + - + - + - - + + diff --git a/backend/src/Squidex.Infrastructure/States/BatchContext.cs b/backend/src/Squidex.Infrastructure/States/BatchContext.cs index 85fdf7220..367787bd9 100644 --- a/backend/src/Squidex.Infrastructure/States/BatchContext.cs +++ b/backend/src/Squidex.Infrastructure/States/BatchContext.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; #pragma warning disable RECS0108 // Warns about static fields in generic types diff --git a/backend/src/Squidex.Infrastructure/States/BatchPersistence.cs b/backend/src/Squidex.Infrastructure/States/BatchPersistence.cs index 23e98ec22..e50ce56dd 100644 --- a/backend/src/Squidex.Infrastructure/States/BatchPersistence.cs +++ b/backend/src/Squidex.Infrastructure/States/BatchPersistence.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/CollectionNameAttribute.cs b/backend/src/Squidex.Infrastructure/States/CollectionNameAttribute.cs index 647420a4b..547b9ad6f 100644 --- a/backend/src/Squidex.Infrastructure/States/CollectionNameAttribute.cs +++ b/backend/src/Squidex.Infrastructure/States/CollectionNameAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.States { [AttributeUsage(AttributeTargets.Class)] diff --git a/backend/src/Squidex.Infrastructure/States/DefaultStreamNameResolver.cs b/backend/src/Squidex.Infrastructure/States/DefaultStreamNameResolver.cs index 06361140b..042d2bcc1 100644 --- a/backend/src/Squidex.Infrastructure/States/DefaultStreamNameResolver.cs +++ b/backend/src/Squidex.Infrastructure/States/DefaultStreamNameResolver.cs @@ -1,11 +1,10 @@ - // ========================================================================== - // Squidex Headless CMS - // ========================================================================== - // Copyright (c) Squidex UG (haftungsbeschraenkt) - // All rights reserved. Licensed under the MIT license. - // ========================================================================== +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== -using System; using Squidex.Infrastructure.Reflection; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/IBatchContext.cs b/backend/src/Squidex.Infrastructure/States/IBatchContext.cs index 0ab7e4bf0..fcc46b8ca 100644 --- a/backend/src/Squidex.Infrastructure/States/IBatchContext.cs +++ b/backend/src/Squidex.Infrastructure/States/IBatchContext.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.States { public interface IBatchContext : IAsyncDisposable, IPersistenceFactory diff --git a/backend/src/Squidex.Infrastructure/States/IPersistence.cs b/backend/src/Squidex.Infrastructure/States/IPersistence.cs index 8f3a2fe72..a22ca67ce 100644 --- a/backend/src/Squidex.Infrastructure/States/IPersistence.cs +++ b/backend/src/Squidex.Infrastructure/States/IPersistence.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/IPersistenceFactory.cs b/backend/src/Squidex.Infrastructure/States/IPersistenceFactory.cs index 737e52003..eebe64b5b 100644 --- a/backend/src/Squidex.Infrastructure/States/IPersistenceFactory.cs +++ b/backend/src/Squidex.Infrastructure/States/IPersistenceFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/ISnapshotStore.cs b/backend/src/Squidex.Infrastructure/States/ISnapshotStore.cs index 68f404698..a751e28c3 100644 --- a/backend/src/Squidex.Infrastructure/States/ISnapshotStore.cs +++ b/backend/src/Squidex.Infrastructure/States/ISnapshotStore.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.States { public interface ISnapshotStore diff --git a/backend/src/Squidex.Infrastructure/States/IStore.cs b/backend/src/Squidex.Infrastructure/States/IStore.cs index 568964982..8926865a3 100644 --- a/backend/src/Squidex.Infrastructure/States/IStore.cs +++ b/backend/src/Squidex.Infrastructure/States/IStore.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.States { public interface IStore : IPersistenceFactory diff --git a/backend/src/Squidex.Infrastructure/States/IStreamNameResolver.cs b/backend/src/Squidex.Infrastructure/States/IStreamNameResolver.cs index f068e2a00..43bc855cd 100644 --- a/backend/src/Squidex.Infrastructure/States/IStreamNameResolver.cs +++ b/backend/src/Squidex.Infrastructure/States/IStreamNameResolver.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.States { public interface IStreamNameResolver diff --git a/backend/src/Squidex.Infrastructure/States/InconsistentStateException.cs b/backend/src/Squidex.Infrastructure/States/InconsistentStateException.cs index e2953ccb4..8d907f4db 100644 --- a/backend/src/Squidex.Infrastructure/States/InconsistentStateException.cs +++ b/backend/src/Squidex.Infrastructure/States/InconsistentStateException.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Runtime.Serialization; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/Persistence.cs b/backend/src/Squidex.Infrastructure/States/Persistence.cs index 0049db756..0a3f1b628 100644 --- a/backend/src/Squidex.Infrastructure/States/Persistence.cs +++ b/backend/src/Squidex.Infrastructure/States/Persistence.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; #pragma warning disable RECS0012 // 'if' statement can be re-written as 'switch' statement diff --git a/backend/src/Squidex.Infrastructure/States/PersistenceMode.cs b/backend/src/Squidex.Infrastructure/States/PersistenceMode.cs index f9bd92ef1..8385c79ff 100644 --- a/backend/src/Squidex.Infrastructure/States/PersistenceMode.cs +++ b/backend/src/Squidex.Infrastructure/States/PersistenceMode.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.States { [Flags] diff --git a/backend/src/Squidex.Infrastructure/States/Store.cs b/backend/src/Squidex.Infrastructure/States/Store.cs index ab1982237..70f3c5edd 100644 --- a/backend/src/Squidex.Infrastructure/States/Store.cs +++ b/backend/src/Squidex.Infrastructure/States/Store.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/States/StoreExtensions.cs b/backend/src/Squidex.Infrastructure/States/StoreExtensions.cs index ecba4720d..2daff1c9f 100644 --- a/backend/src/Squidex.Infrastructure/States/StoreExtensions.cs +++ b/backend/src/Squidex.Infrastructure/States/StoreExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Squidex.Infrastructure.EventSourcing; namespace Squidex.Infrastructure.States diff --git a/backend/src/Squidex.Infrastructure/StringExtensions.cs b/backend/src/Squidex.Infrastructure/StringExtensions.cs index a847ddc5c..605527ee6 100644 --- a/backend/src/Squidex.Infrastructure/StringExtensions.cs +++ b/backend/src/Squidex.Infrastructure/StringExtensions.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Linq; using System.Text.RegularExpressions; namespace Squidex.Infrastructure diff --git a/backend/src/Squidex.Infrastructure/Tasks/AsyncHelper.cs b/backend/src/Squidex.Infrastructure/Tasks/AsyncHelper.cs index 6603c87a8..7cc8dc20b 100644 --- a/backend/src/Squidex.Infrastructure/Tasks/AsyncHelper.cs +++ b/backend/src/Squidex.Infrastructure/Tasks/AsyncHelper.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; using System.Threading.Channels; -using System.Threading.Tasks; namespace Squidex.Infrastructure.Tasks { diff --git a/backend/src/Squidex.Infrastructure/Tasks/PartitionedActionBlock.cs b/backend/src/Squidex.Infrastructure/Tasks/PartitionedActionBlock.cs index 174b050c8..9ebf51641 100644 --- a/backend/src/Squidex.Infrastructure/Tasks/PartitionedActionBlock.cs +++ b/backend/src/Squidex.Infrastructure/Tasks/PartitionedActionBlock.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; namespace Squidex.Infrastructure.Tasks diff --git a/backend/src/Squidex.Infrastructure/Tasks/TaskExtensions.cs b/backend/src/Squidex.Infrastructure/Tasks/TaskExtensions.cs index dda76012d..80cefb7e8 100644 --- a/backend/src/Squidex.Infrastructure/Tasks/TaskExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Tasks/TaskExtensions.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; namespace Squidex.Infrastructure.Tasks diff --git a/backend/src/Squidex.Infrastructure/Timers/CompletionTimer.cs b/backend/src/Squidex.Infrastructure/Timers/CompletionTimer.cs index 06f991aa4..1ff633f49 100644 --- a/backend/src/Squidex.Infrastructure/Timers/CompletionTimer.cs +++ b/backend/src/Squidex.Infrastructure/Timers/CompletionTimer.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Timers { public sealed class CompletionTimer diff --git a/backend/src/Squidex.Infrastructure/Translations/MissingKeys.cs b/backend/src/Squidex.Infrastructure/Translations/MissingKeys.cs index 0b2531356..790ab9e6c 100644 --- a/backend/src/Squidex.Infrastructure/Translations/MissingKeys.cs +++ b/backend/src/Squidex.Infrastructure/Translations/MissingKeys.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.IO; - namespace Squidex.Infrastructure.Translations { public sealed class MissingKeys diff --git a/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs b/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs index 975ed47b4..56ab7707e 100644 --- a/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs +++ b/backend/src/Squidex.Infrastructure/Translations/ResourcesLocalizer.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; using System.Resources; using System.Text; @@ -65,7 +64,7 @@ namespace Squidex.Infrastructure.Translations indexOfEnd += indexOfStart; - sb.Append(span.Slice(0, indexOfStart - 1)); + sb.Append(span[.. (indexOfStart - 1)]); var variable = span[indexOfStart..indexOfEnd]; @@ -145,14 +144,12 @@ namespace Squidex.Infrastructure.Translations private string? GetCore(CultureInfo culture, string key) { var translation = resourceManager.GetString(key, culture); - +#if DEBUG if (translation == null) { -#if DEBUG MissingKeys.Log(key); -#endif } - +#endif return translation; } } diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/ApiStats.cs b/backend/src/Squidex.Infrastructure/UsageTracking/ApiStats.cs index eeb8777ff..8b32b3544 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/ApiStats.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/ApiStats.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.UsageTracking diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/ApiUsageTracker.cs b/backend/src/Squidex.Infrastructure/UsageTracking/ApiUsageTracker.cs index ab8ae01cb..3a4f43d2c 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/ApiUsageTracker.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/ApiUsageTracker.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.UsageTracking { public sealed class ApiUsageTracker : IApiUsageTracker diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/BackgroundUsageTracker.cs b/backend/src/Squidex.Infrastructure/UsageTracking/BackgroundUsageTracker.cs index ea38d344d..92a6af597 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/BackgroundUsageTracker.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/BackgroundUsageTracker.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Squidex.Infrastructure.Timers; using Squidex.Log; diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/CachingUsageTracker.cs b/backend/src/Squidex.Infrastructure/UsageTracking/CachingUsageTracker.cs index 760ca8cef..ab186fa81 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/CachingUsageTracker.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/CachingUsageTracker.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; namespace Squidex.Infrastructure.UsageTracking diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/Counters.cs b/backend/src/Squidex.Infrastructure/UsageTracking/Counters.cs index b5440793d..e1a61b66a 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/Counters.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/Counters.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Infrastructure.UsageTracking { public sealed class Counters : Dictionary diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/IApiUsageTracker.cs b/backend/src/Squidex.Infrastructure/UsageTracking/IApiUsageTracker.cs index 7f6b8598c..b4a43a28e 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/IApiUsageTracker.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/IApiUsageTracker.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.UsageTracking { public interface IApiUsageTracker diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/IUsageRepository.cs b/backend/src/Squidex.Infrastructure/UsageTracking/IUsageRepository.cs index 6fd0d7e12..232754e28 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/IUsageRepository.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/IUsageRepository.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.UsageTracking { public interface IUsageRepository diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/IUsageTracker.cs b/backend/src/Squidex.Infrastructure/UsageTracking/IUsageTracker.cs index d6178ccf1..72b4a5f84 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/IUsageTracker.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/IUsageTracker.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.UsageTracking { public interface IUsageTracker diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/StoredUsage.cs b/backend/src/Squidex.Infrastructure/UsageTracking/StoredUsage.cs index e699d8746..6584388aa 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/StoredUsage.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/StoredUsage.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Squidex.Infrastructure.UsageTracking diff --git a/backend/src/Squidex.Infrastructure/UsageTracking/UsageUpdate.cs b/backend/src/Squidex.Infrastructure/UsageTracking/UsageUpdate.cs index b23c45696..7cdd9ecf2 100644 --- a/backend/src/Squidex.Infrastructure/UsageTracking/UsageUpdate.cs +++ b/backend/src/Squidex.Infrastructure/UsageTracking/UsageUpdate.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Infrastructure.UsageTracking { public struct UsageUpdate diff --git a/backend/src/Squidex.Infrastructure/Validation/AbsoluteUrlAttribute.cs b/backend/src/Squidex.Infrastructure/Validation/AbsoluteUrlAttribute.cs index e8c4b5a36..1d90d8b0a 100644 --- a/backend/src/Squidex.Infrastructure/Validation/AbsoluteUrlAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Validation/AbsoluteUrlAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/LocalizedEmailAddressAttribute.cs b/backend/src/Squidex.Infrastructure/Validation/LocalizedEmailAddressAttribute.cs index 15bc81a59..2b3f144ff 100644 --- a/backend/src/Squidex.Infrastructure/Validation/LocalizedEmailAddressAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Validation/LocalizedEmailAddressAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/LocalizedRangeAttribute.cs b/backend/src/Squidex.Infrastructure/Validation/LocalizedRangeAttribute.cs index 5e3b7a483..44ab8a251 100644 --- a/backend/src/Squidex.Infrastructure/Validation/LocalizedRangeAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Validation/LocalizedRangeAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/LocalizedRegularExpressionAttribute.cs b/backend/src/Squidex.Infrastructure/Validation/LocalizedRegularExpressionAttribute.cs index cef55b31c..108d8ccdf 100644 --- a/backend/src/Squidex.Infrastructure/Validation/LocalizedRegularExpressionAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Validation/LocalizedRegularExpressionAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/LocalizedRequiredAttribute.cs b/backend/src/Squidex.Infrastructure/Validation/LocalizedRequiredAttribute.cs index 5fa2d84da..af3b95550 100644 --- a/backend/src/Squidex.Infrastructure/Validation/LocalizedRequiredAttribute.cs +++ b/backend/src/Squidex.Infrastructure/Validation/LocalizedRequiredAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.ComponentModel.DataAnnotations; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/Validate.cs b/backend/src/Squidex.Infrastructure/Validation/Validate.cs index eb24801b2..bea66d02c 100644 --- a/backend/src/Squidex.Infrastructure/Validation/Validate.cs +++ b/backend/src/Squidex.Infrastructure/Validation/Validate.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - namespace Squidex.Infrastructure.Validation { public static class Validate diff --git a/backend/src/Squidex.Infrastructure/Validation/ValidationError.cs b/backend/src/Squidex.Infrastructure/Validation/ValidationError.cs index 2cca94158..0038840c6 100644 --- a/backend/src/Squidex.Infrastructure/Validation/ValidationError.cs +++ b/backend/src/Squidex.Infrastructure/Validation/ValidationError.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; - namespace Squidex.Infrastructure.Validation { [Serializable] diff --git a/backend/src/Squidex.Infrastructure/Validation/ValidationException.cs b/backend/src/Squidex.Infrastructure/Validation/ValidationException.cs index 4a2a7ed50..7a084afa3 100644 --- a/backend/src/Squidex.Infrastructure/Validation/ValidationException.cs +++ b/backend/src/Squidex.Infrastructure/Validation/ValidationException.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Runtime.Serialization; using System.Text; diff --git a/backend/src/Squidex.Infrastructure/Validation/ValidationExtensions.cs b/backend/src/Squidex.Infrastructure/Validation/ValidationExtensions.cs index be2b0a2fd..1eac96a00 100644 --- a/backend/src/Squidex.Infrastructure/Validation/ValidationExtensions.cs +++ b/backend/src/Squidex.Infrastructure/Validation/ValidationExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Text.RegularExpressions; #pragma warning disable RECS0026 // Possible unassigned object created by 'new' diff --git a/backend/src/Squidex.Shared/Identity/SquidexClaimsExtensions.cs b/backend/src/Squidex.Shared/Identity/SquidexClaimsExtensions.cs index 3aae4498b..e5d948923 100644 --- a/backend/src/Squidex.Shared/Identity/SquidexClaimsExtensions.cs +++ b/backend/src/Squidex.Shared/Identity/SquidexClaimsExtensions.cs @@ -123,9 +123,9 @@ namespace Squidex.Shared.Identity { var url = user.FirstOrDefault(x => x.Type == SquidexClaimTypes.PictureUrl)?.Value; - if (!string.IsNullOrWhiteSpace(url) && Uri.IsWellFormedUriString(url, UriKind.Absolute) && url.Contains("gravatar", StringComparison.Ordinal)) + if (Uri.IsWellFormedUriString(url, UriKind.Absolute) && url.Contains("gravatar", StringComparison.Ordinal)) { - if (url.Contains("?", StringComparison.Ordinal)) + if (url.Contains('?', StringComparison.Ordinal)) { url += "&d=404"; } diff --git a/backend/src/Squidex.Shared/Squidex.Shared.csproj b/backend/src/Squidex.Shared/Squidex.Shared.csproj index 007762ef1..cad46c6d9 100644 --- a/backend/src/Squidex.Shared/Squidex.Shared.csproj +++ b/backend/src/Squidex.Shared/Squidex.Shared.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9.0 enable @@ -9,7 +9,7 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Web/ApiController.cs b/backend/src/Squidex.Web/ApiController.cs index e5244d4b8..6616693a0 100644 --- a/backend/src/Squidex.Web/ApiController.cs +++ b/backend/src/Squidex.Web/ApiController.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Squidex.Domain.Apps.Entities; diff --git a/backend/src/Squidex.Web/ApiCostsAttribute.cs b/backend/src/Squidex.Web/ApiCostsAttribute.cs index f2e349ae1..afae1d92e 100644 --- a/backend/src/Squidex.Web/ApiCostsAttribute.cs +++ b/backend/src/Squidex.Web/ApiCostsAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Mvc; using Squidex.Web.Pipeline; diff --git a/backend/src/Squidex.Web/ApiExceptionConverter.cs b/backend/src/Squidex.Web/ApiExceptionConverter.cs index 98ee76ff1..7bcba509a 100644 --- a/backend/src/Squidex.Web/ApiExceptionConverter.cs +++ b/backend/src/Squidex.Web/ApiExceptionConverter.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Security; using System.Text; using Microsoft.AspNetCore.Http; diff --git a/backend/src/Squidex.Web/ApiExceptionFilterAttribute.cs b/backend/src/Squidex.Web/ApiExceptionFilterAttribute.cs index 6f903cba2..894e45dcf 100644 --- a/backend/src/Squidex.Web/ApiExceptionFilterAttribute.cs +++ b/backend/src/Squidex.Web/ApiExceptionFilterAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; diff --git a/backend/src/Squidex.Web/ApiModelValidationAttribute.cs b/backend/src/Squidex.Web/ApiModelValidationAttribute.cs index dc192e9d7..1f513c186 100644 --- a/backend/src/Squidex.Web/ApiModelValidationAttribute.cs +++ b/backend/src/Squidex.Web/ApiModelValidationAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; diff --git a/backend/src/Squidex.Web/ApiPermissionAttribute.cs b/backend/src/Squidex.Web/ApiPermissionAttribute.cs index 71392b2b1..f7eb6152e 100644 --- a/backend/src/Squidex.Web/ApiPermissionAttribute.cs +++ b/backend/src/Squidex.Web/ApiPermissionAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/backend/src/Squidex.Web/AssetRequestSizeLimitAttribute.cs b/backend/src/Squidex.Web/AssetRequestSizeLimitAttribute.cs index 375bb6969..dac4dc312 100644 --- a/backend/src/Squidex.Web/AssetRequestSizeLimitAttribute.cs +++ b/backend/src/Squidex.Web/AssetRequestSizeLimitAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/backend/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs b/backend/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs index 19c106881..a5eec9c11 100644 --- a/backend/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs +++ b/backend/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; using Squidex.Domain.Apps.Entities; diff --git a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs index 26e800b4f..909f0b7aa 100644 --- a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs +++ b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Squidex.Domain.Apps.Entities; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs index 090bb21e4..56e24b6e6 100644 --- a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs +++ b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithContentIdCommandMiddleware.cs b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithContentIdCommandMiddleware.cs index 457b5faa1..f1c946cd4 100644 --- a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithContentIdCommandMiddleware.cs +++ b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithContentIdCommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs index c47ffb723..31c4c1a23 100644 --- a/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs +++ b/backend/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex.Web/ContextProvider.cs b/backend/src/Squidex.Web/ContextProvider.cs index 1ef8c51b8..f64ca2d6b 100644 --- a/backend/src/Squidex.Web/ContextProvider.cs +++ b/backend/src/Squidex.Web/ContextProvider.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading; using Microsoft.AspNetCore.Http; using Squidex.Domain.Apps.Entities; diff --git a/backend/src/Squidex.Web/Deferred.cs b/backend/src/Squidex.Web/Deferred.cs index b371af54f..53a9c3154 100644 --- a/backend/src/Squidex.Web/Deferred.cs +++ b/backend/src/Squidex.Web/Deferred.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Squidex.Infrastructure; namespace Squidex.Web diff --git a/backend/src/Squidex.Web/ETagExtensions.cs b/backend/src/Squidex.Web/ETagExtensions.cs index a3646b957..d85c36282 100644 --- a/backend/src/Squidex.Web/ETagExtensions.cs +++ b/backend/src/Squidex.Web/ETagExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; using System.Security.Cryptography; using System.Text; diff --git a/backend/src/Squidex.Web/ExposedConfiguration.cs b/backend/src/Squidex.Web/ExposedConfiguration.cs index 169cfc9fb..5b62aa2b1 100644 --- a/backend/src/Squidex.Web/ExposedConfiguration.cs +++ b/backend/src/Squidex.Web/ExposedConfiguration.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Web { public sealed class ExposedConfiguration : Dictionary diff --git a/backend/src/Squidex.Web/ExposedValues.cs b/backend/src/Squidex.Web/ExposedValues.cs index 84eeaaf9b..f1d5b3408 100644 --- a/backend/src/Squidex.Web/ExposedValues.cs +++ b/backend/src/Squidex.Web/ExposedValues.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Reflection; using System.Text; using Microsoft.Extensions.Configuration; diff --git a/backend/src/Squidex.Web/Extensions.cs b/backend/src/Squidex.Web/Extensions.cs index c1760ae6a..aeaa8d514 100644 --- a/backend/src/Squidex.Web/Extensions.cs +++ b/backend/src/Squidex.Web/Extensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics.CodeAnalysis; using System.Security.Claims; using Microsoft.AspNetCore.Http; diff --git a/backend/src/Squidex.Web/FileCallbackResult.cs b/backend/src/Squidex.Web/FileCallbackResult.cs index ef930278e..cd8248ca5 100644 --- a/backend/src/Squidex.Web/FileCallbackResult.cs +++ b/backend/src/Squidex.Web/FileCallbackResult.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Squidex.Assets; diff --git a/backend/src/Squidex.Web/GraphQL/DynamicExecutor.cs b/backend/src/Squidex.Web/GraphQL/DynamicExecutor.cs index 1f9ddcffa..c7c1549f0 100644 --- a/backend/src/Squidex.Web/GraphQL/DynamicExecutor.cs +++ b/backend/src/Squidex.Web/GraphQL/DynamicExecutor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using GraphQL; using Squidex.Domain.Apps.Entities.Contents.GraphQL; diff --git a/backend/src/Squidex.Web/GraphQL/DynamicUserContextBuilder.cs b/backend/src/Squidex.Web/GraphQL/DynamicUserContextBuilder.cs index 7a7840372..374bbb17e 100644 --- a/backend/src/Squidex.Web/GraphQL/DynamicUserContextBuilder.cs +++ b/backend/src/Squidex.Web/GraphQL/DynamicUserContextBuilder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; using GraphQL.Server.Transports.AspNetCore; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; diff --git a/backend/src/Squidex.Web/GraphQL/GraphQLMiddleware.cs b/backend/src/Squidex.Web/GraphQL/GraphQLMiddleware.cs index fcc6f5270..e00876697 100644 --- a/backend/src/Squidex.Web/GraphQL/GraphQLMiddleware.cs +++ b/backend/src/Squidex.Web/GraphQL/GraphQLMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using GraphQL.Server.Transports.AspNetCore; using Microsoft.AspNetCore.Http; diff --git a/backend/src/Squidex.Web/Json/TypedJsonInheritanceConverter.cs b/backend/src/Squidex.Web/Json/TypedJsonInheritanceConverter.cs index 06d7a1b99..dbe7ee45a 100644 --- a/backend/src/Squidex.Web/Json/TypedJsonInheritanceConverter.cs +++ b/backend/src/Squidex.Web/Json/TypedJsonInheritanceConverter.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using System.Runtime.Serialization; using Newtonsoft.Json.Linq; @@ -32,7 +29,7 @@ namespace Squidex.Web.Json if (discriminator.EndsWith(baseName, StringComparison.CurrentCulture)) { - discriminator = discriminator.Substring(0, discriminator.Length - baseName.Length); + discriminator = discriminator[..^baseName.Length]; } result[discriminator] = type; diff --git a/backend/src/Squidex.Web/Pipeline/AccessTokenQueryMiddleware.cs b/backend/src/Squidex.Web/Pipeline/AccessTokenQueryMiddleware.cs index 4d19be76e..c071cae43 100644 --- a/backend/src/Squidex.Web/Pipeline/AccessTokenQueryMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/AccessTokenQueryMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Net.Http.Headers; diff --git a/backend/src/Squidex.Web/Pipeline/ActionContextLogAppender.cs b/backend/src/Squidex.Web/Pipeline/ActionContextLogAppender.cs index 506220290..057e81231 100644 --- a/backend/src/Squidex.Web/Pipeline/ActionContextLogAppender.cs +++ b/backend/src/Squidex.Web/Pipeline/ActionContextLogAppender.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Diagnostics; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Infrastructure; diff --git a/backend/src/Squidex.Web/Pipeline/ApiCostsFilter.cs b/backend/src/Squidex.Web/Pipeline/ApiCostsFilter.cs index cb61eabe1..98a2a1094 100644 --- a/backend/src/Squidex.Web/Pipeline/ApiCostsFilter.cs +++ b/backend/src/Squidex.Web/Pipeline/ApiCostsFilter.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Squidex.Domain.Apps.Entities.Apps.Plans; diff --git a/backend/src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs b/backend/src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs index 672022d73..1733d63b4 100644 --- a/backend/src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs +++ b/backend/src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Squidex.Shared; using Squidex.Shared.Identity; diff --git a/backend/src/Squidex.Web/Pipeline/AppResolver.cs b/backend/src/Squidex.Web/Pipeline/AppResolver.cs index 8ae304c04..1c51e453e 100644 --- a/backend/src/Squidex.Web/Pipeline/AppResolver.cs +++ b/backend/src/Squidex.Web/Pipeline/AppResolver.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; diff --git a/backend/src/Squidex.Web/Pipeline/CachingFilter.cs b/backend/src/Squidex.Web/Pipeline/CachingFilter.cs index 36c34a515..df0fc6df6 100644 --- a/backend/src/Squidex.Web/Pipeline/CachingFilter.cs +++ b/backend/src/Squidex.Web/Pipeline/CachingFilter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs b/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs index fd3e083c0..410219eb0 100644 --- a/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/CachingKeysMiddleware.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Options; using Microsoft.Net.Http.Headers; diff --git a/backend/src/Squidex.Web/Pipeline/CachingManager.cs b/backend/src/Squidex.Web/Pipeline/CachingManager.cs index c9ce67b69..2572c48ab 100644 --- a/backend/src/Squidex.Web/Pipeline/CachingManager.cs +++ b/backend/src/Squidex.Web/Pipeline/CachingManager.cs @@ -5,13 +5,9 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Security.Cryptography; using System.Text; -using System.Threading; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.Options; diff --git a/backend/src/Squidex.Web/Pipeline/DeferredActionFilter.cs b/backend/src/Squidex.Web/Pipeline/DeferredActionFilter.cs index 5a42ed364..fc1bb0728 100644 --- a/backend/src/Squidex.Web/Pipeline/DeferredActionFilter.cs +++ b/backend/src/Squidex.Web/Pipeline/DeferredActionFilter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/backend/src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs b/backend/src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs index e9cacb357..3a2f984df 100644 --- a/backend/src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs +++ b/backend/src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Logging; diff --git a/backend/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs b/backend/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs index 01b566b4e..78edcd0be 100644 --- a/backend/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Squidex.Caching; diff --git a/backend/src/Squidex.Web/Pipeline/MeasureResultFilter.cs b/backend/src/Squidex.Web/Pipeline/MeasureResultFilter.cs index c1f1c6add..6d66113ab 100644 --- a/backend/src/Squidex.Web/Pipeline/MeasureResultFilter.cs +++ b/backend/src/Squidex.Web/Pipeline/MeasureResultFilter.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/Pipeline/RequestExceptionMiddleware.cs b/backend/src/Squidex.Web/Pipeline/RequestExceptionMiddleware.cs index c487f1025..1e0df6278 100644 --- a/backend/src/Squidex.Web/Pipeline/RequestExceptionMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/RequestExceptionMiddleware.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; diff --git a/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs b/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs index ac3757e6d..1e9f8ddde 100644 --- a/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Options; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/Pipeline/SameSiteCookiesServiceCollectionExtensions.cs b/backend/src/Squidex.Web/Pipeline/SameSiteCookiesServiceCollectionExtensions.cs index f9a1db133..d91d7c060 100644 --- a/backend/src/Squidex.Web/Pipeline/SameSiteCookiesServiceCollectionExtensions.cs +++ b/backend/src/Squidex.Web/Pipeline/SameSiteCookiesServiceCollectionExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; diff --git a/backend/src/Squidex.Web/Pipeline/SchemaResolver.cs b/backend/src/Squidex.Web/Pipeline/SchemaResolver.cs index 7af6a4c51..ee1593c6e 100644 --- a/backend/src/Squidex.Web/Pipeline/SchemaResolver.cs +++ b/backend/src/Squidex.Web/Pipeline/SchemaResolver.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Security.Claims; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Squidex.Domain.Apps.Entities; diff --git a/backend/src/Squidex.Web/Pipeline/SetupMiddleware.cs b/backend/src/Squidex.Web/Pipeline/SetupMiddleware.cs index d186d6062..99a364ff3 100644 --- a/backend/src/Squidex.Web/Pipeline/SetupMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/SetupMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Squidex.Domain.Users; diff --git a/backend/src/Squidex.Web/Pipeline/UsageMiddleware.cs b/backend/src/Squidex.Web/Pipeline/UsageMiddleware.cs index e51dcf75c..fbc2243ff 100644 --- a/backend/src/Squidex.Web/Pipeline/UsageMiddleware.cs +++ b/backend/src/Squidex.Web/Pipeline/UsageMiddleware.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using NodaTime; @@ -92,7 +91,7 @@ namespace Squidex.Web.Pipeline private static UsageResponseBodyFeature SetUsageBody(HttpContext context) { - var originalBodyFeature = context.Features.Get(); + var originalBodyFeature = context.Features.Get()!; var usageBody = new UsageResponseBodyFeature(originalBodyFeature); diff --git a/backend/src/Squidex.Web/Pipeline/UsagePipeWriter.cs b/backend/src/Squidex.Web/Pipeline/UsagePipeWriter.cs index a7ab34cdc..30e3ddabc 100644 --- a/backend/src/Squidex.Web/Pipeline/UsagePipeWriter.cs +++ b/backend/src/Squidex.Web/Pipeline/UsagePipeWriter.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.IO.Pipelines; -using System.Threading; -using System.Threading.Tasks; namespace Squidex.Web.Pipeline { diff --git a/backend/src/Squidex.Web/Pipeline/UsageResponseBodyFeature.cs b/backend/src/Squidex.Web/Pipeline/UsageResponseBodyFeature.cs index 1e7fb73b9..cbfca0ce8 100644 --- a/backend/src/Squidex.Web/Pipeline/UsageResponseBodyFeature.cs +++ b/backend/src/Squidex.Web/Pipeline/UsageResponseBodyFeature.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.IO; using System.IO.Pipelines; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Features; namespace Squidex.Web.Pipeline diff --git a/backend/src/Squidex.Web/Pipeline/UsageStream.cs b/backend/src/Squidex.Web/Pipeline/UsageStream.cs index e9b78f165..0207e8451 100644 --- a/backend/src/Squidex.Web/Pipeline/UsageStream.cs +++ b/backend/src/Squidex.Web/Pipeline/UsageStream.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; - #pragma warning disable CA1835 // Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' namespace Squidex.Web.Pipeline diff --git a/backend/src/Squidex.Web/Resource.cs b/backend/src/Squidex.Web/Resource.cs index 5da8e4377..85de4a51e 100644 --- a/backend/src/Squidex.Web/Resource.cs +++ b/backend/src/Squidex.Web/Resource.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/Resources.cs b/backend/src/Squidex.Web/Resources.cs index 543415d84..26ca6d782 100644 --- a/backend/src/Squidex.Web/Resources.cs +++ b/backend/src/Squidex.Web/Resources.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Lazy; using Squidex.Domain.Apps.Entities; using Squidex.Infrastructure; diff --git a/backend/src/Squidex.Web/SchemaMustBePublishedAttribute.cs b/backend/src/Squidex.Web/SchemaMustBePublishedAttribute.cs index 3216f7b30..aeee779e5 100644 --- a/backend/src/Squidex.Web/SchemaMustBePublishedAttribute.cs +++ b/backend/src/Squidex.Web/SchemaMustBePublishedAttribute.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; - namespace Squidex.Web { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] diff --git a/backend/src/Squidex.Web/Services/StringLocalizer.cs b/backend/src/Squidex.Web/Services/StringLocalizer.cs index 7ce6c24bd..52b57c098 100644 --- a/backend/src/Squidex.Web/Services/StringLocalizer.cs +++ b/backend/src/Squidex.Web/Services/StringLocalizer.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using Microsoft.Extensions.Localization; using Squidex.Infrastructure.Translations; using Squidex.Text; diff --git a/backend/src/Squidex.Web/Squidex.Web.csproj b/backend/src/Squidex.Web/Squidex.Web.csproj index 3dbb9ebc9..ad74eb2ea 100644 --- a/backend/src/Squidex.Web/Squidex.Web.csproj +++ b/backend/src/Squidex.Web/Squidex.Web.csproj @@ -1,7 +1,8 @@  - net5.0 - 9.0 + net6.0 + 10.0 + enable enable @@ -12,13 +13,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Web/UrlDecodeRouteParamsAttribute.cs b/backend/src/Squidex.Web/UrlDecodeRouteParamsAttribute.cs index 041a2a74a..a515a9808 100644 --- a/backend/src/Squidex.Web/UrlDecodeRouteParamsAttribute.cs +++ b/backend/src/Squidex.Web/UrlDecodeRouteParamsAttribute.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using System.Web; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/backend/src/Squidex.Web/UrlHelperExtensions.cs b/backend/src/Squidex.Web/UrlHelperExtensions.cs index ee461ca35..a45fc55e6 100644 --- a/backend/src/Squidex.Web/UrlHelperExtensions.cs +++ b/backend/src/Squidex.Web/UrlHelperExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Mvc; #pragma warning disable RECS0108 // Warns about static fields in generic types @@ -26,7 +25,7 @@ namespace Squidex.Web if (name.EndsWith(suffix, StringComparison.Ordinal)) { - name = name.Substring(0, name.Length - suffix.Length); + name = name[..^suffix.Length]; } Controller = name; @@ -35,7 +34,7 @@ namespace Squidex.Web public static string Url(this IUrlHelper urlHelper, Func action, object? values = null) where T : Controller { - return urlHelper.Action(action(null), NameOf.Controller, values); + return urlHelper.Action(action(null), NameOf.Controller, values)!; } public static string Url(this Controller controller, Func action, object? values = null) where T : Controller diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/CommonProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/CommonProcessor.cs index 39537e783..e566169e9 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/CommonProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/CommonProcessor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using NSwag; using NSwag.Generation.Processors; using NSwag.Generation.Processors.Contexts; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/ErrorDtoProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/ErrorDtoProcessor.cs index 86f89e977..739eb24b6 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/ErrorDtoProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/ErrorDtoProcessor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Namotion.Reflection; using NJsonSchema; using NSwag; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiExtensions.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiExtensions.cs index 2f4a68109..89dac538f 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiExtensions.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiExtensions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Builder; - namespace Squidex.Areas.Api.Config.OpenApi { public static class OpenApiExtensions diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs index 848df7ed9..6b152b2a9 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using NJsonSchema; using NJsonSchema.Generation; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/QueryExtensions.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/QueryExtensions.cs index 98ee3ed3c..5601735db 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/QueryExtensions.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/QueryExtensions.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using NJsonSchema; using NSwag; using Squidex.Domain.Apps.Core; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/ScopesProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/ScopesProcessor.cs index 47eacc78e..374e76941 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/ScopesProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/ScopesProcessor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Authorization; using NSwag; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/SecurityProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/SecurityProcessor.cs index da4d4019b..947dff27f 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/SecurityProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/SecurityProcessor.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using NSwag; using NSwag.Generation.Processors.Security; using Squidex.Hosting; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/TagByGroupNameProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/TagByGroupNameProcessor.cs index 3143abab4..93060205d 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/TagByGroupNameProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/TagByGroupNameProcessor.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Reflection; using Microsoft.AspNetCore.Mvc; using NSwag.Generation.Processors; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlResponseTypesProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlResponseTypesProcessor.cs index bbe640280..65b315228 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlResponseTypesProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlResponseTypesProcessor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Text.RegularExpressions; using Namotion.Reflection; using NSwag; diff --git a/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlTagProcessor.cs b/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlTagProcessor.cs index 16c543735..9d4c938a9 100644 --- a/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlTagProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Config/OpenApi/XmlTagProcessor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc; using Namotion.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppAssetsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppAssetsController.cs index a8bdfa9d1..79e854ba9 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppAssetsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppAssetsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs index f27d26230..5d8a800b4 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs index a7afcc345..de8e782f6 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs index 4c2ddd150..f4ef28c6c 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs index aa7ca80dd..0e740a3e6 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppSettingsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppSettingsController.cs index 140cf7f45..ebcf77d5f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppSettingsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppSettingsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs index 76463809f..332741a8e 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs index aeb0ad5ae..fe2e4fdf4 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Apps.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs index bf65e2919..bdf942b4f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; using Squidex.Areas.Api.Controllers.Assets; using Squidex.Areas.Api.Controllers.Backups; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguageDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguageDto.cs index ab269729a..714b6d20f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguageDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguageDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguagesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguagesDto.cs index 8fc3f8ef0..1b4380c80 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguagesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppLanguagesDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppSettingsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppSettingsDto.cs index 69774611f..db73b07bd 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppSettingsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/AppSettingsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ClientsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ClientsDto.cs index 08ee667b1..6cffaee03 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ClientsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ClientsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorDto.cs index 017e626ed..12b2d91ef 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure.Translations; using Squidex.Infrastructure.Validation; using Squidex.Shared.Identity; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorsDto.cs index cb832acf5..7a6637cbd 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/ContributorsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; using Newtonsoft.Json; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps.Plans; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RoleDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RoleDto.cs index 954b8c914..bb21cd804 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RoleDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RoleDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure.Json.Objects; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RolesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RolesDto.cs index 787811395..a69d9a0c1 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RolesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/RolesDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateAppSettingsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateAppSettingsDto.cs index 6185ee862..43ba95cd3 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateAppSettingsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateAppSettingsDto.cs @@ -6,7 +6,6 @@ // ========================================================================== using System.ComponentModel.DataAnnotations; -using System.Linq; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs index 7a0449c94..f3aeae67c 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowDto.cs index 3d584c9d2..b6b7d0aed 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowStepDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowStepDto.cs index 2854ee856..902afb5d5 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowStepDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowStepDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Infrastructure.Collections; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowTransitionDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowTransitionDto.cs index e6afdd31f..c3c61384e 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowTransitionDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowTransitionDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.Contents; namespace Squidex.Areas.Api.Controllers.Apps.Models diff --git a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowsDto.cs index 0e112124a..d7888ff02 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Apps/Models/WorkflowsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs index b70835d06..e1041be22 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs @@ -5,13 +5,8 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.IO; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Assets.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetFoldersController.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetFoldersController.cs index 050f044ba..69942014e 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetFoldersController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetFoldersController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Assets.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs index 3f91cf05b..2e39db323 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs @@ -5,12 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using NSwag.Annotations; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AnnotateAssetDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AnnotateAssetDto.cs index d5809231c..b617f285f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AnnotateAssetDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AnnotateAssetDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs index 4cefeee41..fb9e64a3c 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Newtonsoft.Json; using NodaTime; using Squidex.Domain.Apps.Core.Assets; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetFoldersDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetFoldersDto.cs index ec9f3859c..a16928429 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetFoldersDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetFoldersDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Infrastructure; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetsDto.cs index 69aecf96f..89ac621c0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/AssetsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Assets; using Squidex.Infrastructure; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsDto.cs index ee122beef..dd9fbc108 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsJobDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsJobDto.cs index bde51e2fa..3e5bd6d1b 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsJobDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/BulkUpdateAssetsJobDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/CreateAssetDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/CreateAssetDto.cs index b1fd62c53..5bd199380 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/CreateAssetDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/CreateAssetDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/UpsertAssetDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/UpsertAssetDto.cs index 3ca61461d..20ca9df56 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/UpsertAssetDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Assets/Models/UpsertAssetDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Assets; using Squidex.Domain.Apps.Entities.Assets.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs index bc5d9c120..c2a00c9c3 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs @@ -5,9 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Domain.Apps.Entities.Backup; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs index aa33d430a..da346e256 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Backups.Models; using Squidex.Domain.Apps.Entities.Backup; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/BackupJobsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/BackupJobsDto.cs index 8f18609bb..15bac6bd1 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/BackupJobsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/BackupJobsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Backup; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreJobDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreJobDto.cs index 9a5fd2212..bcae691d2 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreJobDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreJobDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NodaTime; using Squidex.Domain.Apps.Entities.Backup; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreRequestDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreRequestDto.cs index 7ffd28a81..53646c344 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreRequestDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/Models/RestoreRequestDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Infrastructure.Validation; namespace Squidex.Areas.Api.Controllers.Backups.Models diff --git a/backend/src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs b/backend/src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs index 765ba6c67..bde9f3579 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Backups.Models; using Squidex.Domain.Apps.Entities.Backup; diff --git a/backend/src/Squidex/Areas/Api/Controllers/BulkResultDto.cs b/backend/src/Squidex/Areas/Api/Controllers/BulkResultDto.cs index bd0ade02b..6539839bc 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/BulkResultDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/BulkResultDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using Microsoft.AspNetCore.Http; using Squidex.Domain.Apps.Entities; using Squidex.Infrastructure; using Squidex.Infrastructure.Reflection; @@ -41,7 +39,7 @@ namespace Squidex.Areas.Api.Controllers { var error = result.Exception?.ToErrorDto(httpContext).Error; - return SimpleMapper.Map(result, new BulkResultDto { Error = error, Id = result.Id }); + return SimpleMapper.Map(result, new BulkResultDto { Error = error }); } } } diff --git a/backend/src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs index b89e6c5a4..b37657bd0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs @@ -6,8 +6,6 @@ // ========================================================================== using System.Globalization; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Comments.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentDto.cs index a7a1c4f83..71f8d86f1 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; using Squidex.Domain.Apps.Core.Comments; using Squidex.Domain.Apps.Entities.Comments.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentsDto.cs index d15b9d0e3..0c62d28cb 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/CommentsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Comments; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/UpsertCommentDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/UpsertCommentDto.cs index 2980369c9..7b8608c5e 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/UpsertCommentDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Comments/Models/UpsertCommentDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Infrastructure; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Comments/Notifications/UserNotificationsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Comments/Notifications/UserNotificationsController.cs index 908b9f3e6..4d1b439ac 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Comments/Notifications/UserNotificationsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Comments/Notifications/UserNotificationsController.cs @@ -5,10 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using System.Globalization; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Comments.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentOpenApiController.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentOpenApiController.cs index 5573fe003..1c82c6a83 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentOpenApiController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentOpenApiController.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Contents.Generator; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs index a504dae7a..9808eb127 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Contents.Models; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/Builder.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/Builder.cs index d1a663806..5c31b3e59 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/Builder.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/Builder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Namotion.Reflection; using NJsonSchema; using NSwag; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationBuilder.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationBuilder.cs index ed7d457b6..b46f99c95 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationBuilder.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationBuilder.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using System.Globalization; using NJsonSchema; using NSwag; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationsBuilder.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationsBuilder.cs index 3f9219ac0..5e15ebae1 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationsBuilder.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/OperationsBuilder.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using NJsonSchema; using NSwag; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasOpenApiGenerator.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasOpenApiGenerator.cs index 681a5085b..ec7bea21f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasOpenApiGenerator.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasOpenApiGenerator.cs @@ -5,11 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using NJsonSchema; using NSwag; using NSwag.Generation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsDto.cs index 5bfd6ce87..90fb3e458 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/BulkUpdateContentsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs index bc7ea86fd..0974df5a2 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using NodaTime; using Squidex.Areas.Api.Controllers.Schemas.Models; using Squidex.Domain.Apps.Core.Contents; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentsDto.cs index 8384f7159..e5f50d827 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ContentsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Contents; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/CreateContentDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/CreateContentDto.cs index 67e521751..e4f4513e6 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/CreateContentDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/CreateContentDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Mvc; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ImportContentsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ImportContentsDto.cs index 7a199403f..f30ba560c 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ImportContentsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/ImportContentsDto.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/UpsertContentDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/UpsertContentDto.cs index ffc07ebf8..5926507e0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/UpsertContentDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Contents/Models/UpsertContentDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Microsoft.AspNetCore.Mvc; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Entities.Contents.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs b/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs index d65e02bef..ed6a27f31 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Orleans; using Squidex.Areas.Api.Controllers.EventConsumers.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/Models/EventConsumersDto.cs b/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/Models/EventConsumersDto.cs index b685ad136..9aa80ba0f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/Models/EventConsumersDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/EventConsumers/Models/EventConsumersDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.EventSourcing; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs b/backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs index 4e1763aae..0b4b69ef0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.History.Models; using Squidex.Domain.Apps.Entities.History; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs b/backend/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs index b714a6ab8..0118399c9 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/News/Models/FeaturesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/News/Models/FeaturesDto.cs index 3f16aec58..533c33bf9 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/News/Models/FeaturesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/News/Models/FeaturesDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure.Validation; namespace Squidex.Areas.Api.Controllers.News.Models diff --git a/backend/src/Squidex/Areas/Api/Controllers/News/NewsController.cs b/backend/src/Squidex/Areas/Api/Controllers/News/NewsController.cs index 074cfb3ce..9b0cea2af 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/News/NewsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/News/NewsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.News.Models; using Squidex.Areas.Api.Controllers.News.Service; diff --git a/backend/src/Squidex/Areas/Api/Controllers/News/Service/FeaturesService.cs b/backend/src/Squidex/Areas/Api/Controllers/News/Service/FeaturesService.cs index dc52f6a27..bb113abea 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/News/Service/FeaturesService.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/News/Service/FeaturesService.cs @@ -5,10 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.Areas.Api.Controllers.News.Models; using Squidex.ClientLibrary; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs b/backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs index 090287338..1308c00e3 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Infrastructure.Commands; using Squidex.Shared; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs b/backend/src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs index a8416aebd..61e825ae6 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Plans.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/AppPlansDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/AppPlansDto.cs index 5f5446bb6..268de7a82 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/AppPlansDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/AppPlansDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps.Plans; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/ChangePlanDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/ChangePlanDto.cs index 74a863b9d..66230b9a0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/ChangePlanDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Plans/Models/ChangePlanDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Http; using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs index 391a1c562..0ccc47667 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Areas.Api.Controllers.Rules.Models.Triggers; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.Triggers; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs index b108b7be4..75cc0f542 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Rules; using Squidex.Web.Json; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionProcessor.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionProcessor.cs index 9e5fcafff..296bd6735 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionProcessor.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionProcessor.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Namotion.Reflection; using NJsonSchema; using NSwag.Generation.Processors; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleElementDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleElementDto.cs index 5b78ff011..5abfea0e1 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleElementDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleElementDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleEventsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleEventsDto.cs index f1c8ba27b..4bca9503e 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleEventsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleEventsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Rules; using Squidex.Infrastructure; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs index 793bd7719..b3df99af2 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; using Squidex.Domain.Apps.Core.Rules; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RulesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RulesDto.cs index 2cf1cab67..eaa646ff0 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RulesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/RulesDto.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Squidex.Domain.Apps.Entities.Rules; using Squidex.Domain.Apps.Entities.Rules.Runner; using Squidex.Infrastructure; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventDto.cs index f78fa89b8..15d79df64 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Entities.Rules.Runner; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventsDto.cs index 04386eb65..5681b2aa6 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/SimulatedRuleEventsDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Rules.Runner; using Squidex.Infrastructure.Validation; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedRuleTriggerDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedRuleTriggerDto.cs index 731cb0c4b..36363b77f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedRuleTriggerDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedRuleTriggerDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules.Triggers; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs b/backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs index 742c74f6c..f33bf602c 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using NodaTime; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigureFieldRulesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigureFieldRulesDto.cs index 239b78218..7791ce71f 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigureFieldRulesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigureFieldRulesDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; using Squidex.Domain.Apps.Entities.Schemas.Commands; namespace Squidex.Areas.Api.Controllers.Schemas.Models diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigurePreviewUrlsDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigurePreviewUrlsDto.cs index 2364fd51b..1a6df7671 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigurePreviewUrlsDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/ConfigurePreviewUrlsDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/CreateSchemaDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/CreateSchemaDto.cs index c154beb65..7d607f7ea 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/CreateSchemaDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/CreateSchemaDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs index d40c3437d..e9e6272dd 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Areas.Api.Controllers.Schemas.Models.Converters; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure.Reflection; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs index 54d5691f3..157b7f9ce 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/AssetsFieldPropertiesDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/AssetsFieldPropertiesDto.cs index 53af5e9c0..5ea6bc329 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/AssetsFieldPropertiesDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/AssetsFieldPropertiesDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using Squidex.Domain.Apps.Core.Assets; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs index 7fa62df37..dcc166eff 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Collections.Generic; -using System.Linq; using NodaTime; using Squidex.Areas.Api.Controllers.Contents; using Squidex.Domain.Apps.Core.Schemas; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemasDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemasDto.cs index dc8e694ff..58a0186fd 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemasDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemasDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/UpsertSchemaDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/UpsertSchemaDto.cs index a7a8cf7f0..1377e0a49 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/UpsertSchemaDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/UpsertSchemaDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Infrastructure.Collections; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs index 017f58eb4..483684f39 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Schemas.Models; using Squidex.Domain.Apps.Entities.Schemas; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs b/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs index 07178cd9c..d21e290ce 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using NSwag.Annotations; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Search/SearchController.cs b/backend/src/Squidex/Areas/Api/Controllers/Search/SearchController.cs index 0d7e6bcca..540a1ac55 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Search/SearchController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Search/SearchController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Search.Models; using Squidex.Domain.Apps.Entities.Search; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsageDtoDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsageDtoDto.cs index d1d79435c..770761317 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsageDtoDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsageDtoDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Domain.Apps.Entities.Apps.Plans; using Squidex.Infrastructure.UsageTracking; using Squidex.Infrastructure.Validation; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsagePerDateDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsagePerDateDto.cs index de1a60634..e11f13450 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsagePerDateDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/CallsUsagePerDateDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; using Squidex.Infrastructure.UsageTracking; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/StorageUsagePerDateDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/StorageUsagePerDateDto.cs index 275fef9ac..5108fcc98 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/StorageUsagePerDateDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Statistics/Models/StorageUsagePerDateDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; using NodaTime; using Squidex.Domain.Apps.Entities.Assets; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs b/backend/src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs index d60a9c171..c517606e7 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs @@ -5,11 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.DataProtection; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Statistics.Models; using Squidex.Domain.Apps.Entities.Apps; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs b/backend/src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs index 539982cea..affed08e7 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Translations.Models; using Squidex.Infrastructure.Commands; diff --git a/backend/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs b/backend/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs index f0115b68c..0b39d5e37 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; - namespace Squidex.Areas.Api.Controllers.UI { public sealed class MyUIOptions diff --git a/backend/src/Squidex/Areas/Api/Controllers/UI/UIController.cs b/backend/src/Squidex/Areas/Api/Controllers/UI/UIController.cs index c31e50611..9a95ee380 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/UI/UIController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/UI/UIController.cs @@ -5,9 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Squidex.Areas.Api.Controllers.UI.Models; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UserDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UserDto.cs index d6e4f8309..c7f3b571b 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UserDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UserDto.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Validation; using Squidex.Shared.Identity; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UsersDto.cs b/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UsersDto.cs index 21469e99d..0e8891c40 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UsersDto.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Users/Models/UsersDto.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Collections.Generic; -using System.Linq; using Squidex.Infrastructure.Validation; using Squidex.Shared.Users; using Squidex.Web; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs b/backend/src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs index 8feb0b513..6f75cd09a 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs @@ -5,8 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Squidex.Areas.Api.Controllers.Users.Models; using Squidex.Domain.Users; diff --git a/backend/src/Squidex/Areas/Api/Controllers/Users/UsersController.cs b/backend/src/Squidex/Areas/Api/Controllers/Users/UsersController.cs index 9016bd16c..b7e5d4088 100644 --- a/backend/src/Squidex/Areas/Api/Controllers/Users/UsersController.cs +++ b/backend/src/Squidex/Areas/Api/Controllers/Users/UsersController.cs @@ -5,12 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Net.Http.Headers; using Squidex.Areas.Api.Controllers.Users.Models; @@ -195,11 +189,12 @@ namespace Squidex.Areas.Api.Controllers.Users if (response.IsSuccessStatusCode) { - var contentType = response.Content.Headers.ContentType?.ToString(); + var contentType = response.Content.Headers.ContentType?.ToString()!; + var contentStream = await response.Content.ReadAsStreamAsync(HttpContext.RequestAborted); var etag = response.Headers.ETag; - var result = new FileStreamResult(await response.Content.ReadAsStreamAsync(HttpContext.RequestAborted), contentType); + var result = new FileStreamResult(contentStream, contentType); if (!string.IsNullOrWhiteSpace(etag?.Tag)) { diff --git a/backend/src/Squidex/Areas/Api/Startup.cs b/backend/src/Squidex/Areas/Api/Startup.cs index 18a65c9db..6c5e0f33e 100644 --- a/backend/src/Squidex/Areas/Api/Startup.cs +++ b/backend/src/Squidex/Areas/Api/Startup.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using Microsoft.AspNetCore.Builder; using Squidex.Areas.Api.Config.OpenApi; using Squidex.Web; using Squidex.Web.Pipeline; diff --git a/backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml b/backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml index bb953d5cd..ecf928ff9 100644 --- a/backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml +++ b/backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml @@ -35,7 +35,7 @@