Browse Source

Fixes nameof

pull/523/head
Sebastian 6 years ago
parent
commit
374d335f94
  1. 2
      backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs
  2. 2
      backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs
  3. 4
      backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs
  4. 2
      backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs
  5. 2
      backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs
  6. 2
      backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs
  7. 2
      backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs
  8. 8
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClient.cs
  9. 12
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs
  10. 6
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs
  11. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppImage.cs
  12. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPattern.cs
  13. 4
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPatterns.cs
  14. 4
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPlan.cs
  15. 10
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs
  16. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs
  17. 6
      backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs
  18. 6
      backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs
  19. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs
  20. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs
  21. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Contents/IdContentData.cs
  22. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Contents/NamedContentData.cs
  23. 8
      backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs
  24. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Named.cs
  25. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs
  26. 8
      backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs
  27. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs
  28. 8
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs
  29. 4
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs
  30. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs
  31. 6
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs
  32. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs
  33. 4
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs
  34. 1
      backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj
  35. 6
      backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverter.cs
  36. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/StringFormatter.cs
  37. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs
  38. 8
      backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueGenerator.cs
  39. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs
  40. 14
      backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs
  41. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs
  42. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs
  43. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs
  44. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/ContentSchemaBuilder.cs
  45. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonSchemaExtensions.cs
  46. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs
  47. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs
  48. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs
  49. 6
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs
  50. 20
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs
  51. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Scripting/EventScriptExtension.cs
  52. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpScriptExtension.cs
  53. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs
  54. 24
      backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs
  55. 10
      backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs
  56. 12
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs
  57. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs
  58. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/FieldBagValidatorsFactory.cs
  59. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs
  60. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs
  61. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs
  62. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs
  63. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs
  64. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs
  65. 4
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollectionAll.cs
  66. 4
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollectionPublished.cs
  67. 4
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs
  68. 2
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContent.cs
  69. 2
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContentsByIds.cs
  70. 6
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContentsByQuery.cs
  71. 2
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduledContents.cs
  72. 2
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/FullText/MongoIndexStorage.cs
  73. 4
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs
  74. 8
      backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs
  75. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/AppCommandMiddleware.cs
  76. 8
      backend/src/Squidex.Domain.Apps.Entities/Apps/AppDomainObject.cs
  77. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs
  78. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs
  79. 4
      backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs
  80. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs
  81. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs
  82. 4
      backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs
  83. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs
  84. 10
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardApp.cs
  85. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppClients.cs
  86. 4
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppContributors.cs
  87. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppLanguages.cs
  88. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppPatterns.cs
  89. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppRoles.cs
  90. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppWorkflows.cs
  91. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs
  92. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs
  93. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs
  94. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs
  95. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs
  96. 8
      backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs
  97. 6
      backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs
  98. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs
  99. 4
      backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs
  100. 10
      backend/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs

2
backend/extensions/Squidex.Extensions/Actions/Comment/CommentActionHandler.cs

@ -25,7 +25,7 @@ namespace Squidex.Extensions.Actions.Comment
public CommentActionHandler(RuleEventFormatter formatter, ICommandBus commandBus)
: base(formatter)
{
Guard.NotNull(commandBus);
Guard.NotNull(commandBus, nameof(commandBus));
this.commandBus = commandBus;
}

2
backend/extensions/Squidex.Extensions/Actions/Fastly/FastlyActionHandler.cs

@ -24,7 +24,7 @@ namespace Squidex.Extensions.Actions.Fastly
public FastlyActionHandler(RuleEventFormatter formatter, IHttpClientFactory httpClientFactory)
: base(formatter)
{
Guard.NotNull(httpClientFactory);
Guard.NotNull(httpClientFactory, nameof(httpClientFactory));
this.httpClientFactory = httpClientFactory;
}

4
backend/extensions/Squidex.Extensions/Actions/Notification/NotificationActionHandler.cs

@ -28,8 +28,8 @@ namespace Squidex.Extensions.Actions.Notification
public NotificationActionHandler(RuleEventFormatter formatter, ICommandBus commandBus, IUserResolver userResolver)
: base(formatter)
{
Guard.NotNull(commandBus);
Guard.NotNull(userResolver);
Guard.NotNull(commandBus, nameof(commandBus));
Guard.NotNull(userResolver, nameof(userResolver));
this.commandBus = commandBus;

2
backend/extensions/Squidex.Extensions/Actions/Slack/SlackActionHandler.cs

@ -25,7 +25,7 @@ namespace Squidex.Extensions.Actions.Slack
public SlackActionHandler(RuleEventFormatter formatter, IHttpClientFactory httpClientFactory)
: base(formatter)
{
Guard.NotNull(httpClientFactory);
Guard.NotNull(httpClientFactory, nameof(httpClientFactory));
this.httpClientFactory = httpClientFactory;
}

2
backend/extensions/Squidex.Extensions/Actions/Twitter/TweetActionHandler.cs

@ -25,7 +25,7 @@ namespace Squidex.Extensions.Actions.Twitter
public TweetActionHandler(RuleEventFormatter formatter, IOptions<TwitterOptions> twitterOptions)
: base(formatter)
{
Guard.NotNull(twitterOptions);
Guard.NotNull(twitterOptions, nameof(twitterOptions));
this.twitterOptions = twitterOptions.Value;
}

2
backend/extensions/Squidex.Extensions/Actions/Webhook/WebhookActionHandler.cs

@ -22,7 +22,7 @@ namespace Squidex.Extensions.Actions.Webhook
public WebhookActionHandler(RuleEventFormatter formatter, IHttpClientFactory httpClientFactory)
: base(formatter)
{
Guard.NotNull(httpClientFactory);
Guard.NotNull(httpClientFactory, nameof(httpClientFactory));
this.httpClientFactory = httpClientFactory;
}

2
backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidatorFactory.cs

@ -20,7 +20,7 @@ namespace Squidex.Extensions.Validation
public CompositeUniqueValidatorFactory(IContentRepository contentRepository)
{
Guard.NotNull(contentRepository);
Guard.NotNull(contentRepository, nameof(contentRepository));
this.contentRepository = contentRepository;
}

8
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClient.cs

@ -20,8 +20,8 @@ namespace Squidex.Domain.Apps.Core.Apps
public AppClient(string name, string secret, string role)
: base(name)
{
Guard.NotNullOrEmpty(secret);
Guard.NotNullOrEmpty(role);
Guard.NotNullOrEmpty(secret, nameof(secret));
Guard.NotNullOrEmpty(role, nameof(role));
Role = role;
@ -31,7 +31,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClient Update(string newRole)
{
Guard.NotNullOrEmpty(newRole);
Guard.NotNullOrEmpty(newRole, nameof(newRole));
return new AppClient(Name, Secret, newRole);
}
@ -39,7 +39,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClient Rename(string newName)
{
Guard.NotNullOrEmpty(newName);
Guard.NotNullOrEmpty(newName, nameof(newName));
return new AppClient(newName, Secret, Role);
}

12
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppClients.cs

@ -29,7 +29,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClients Revoke(string id)
{
Guard.NotNullOrEmpty(id);
Guard.NotNullOrEmpty(id, nameof(id));
return Without<AppClients>(id);
}
@ -37,8 +37,8 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClients Add(string id, AppClient client)
{
Guard.NotNullOrEmpty(id);
Guard.NotNull(client);
Guard.NotNullOrEmpty(id, nameof(id));
Guard.NotNull(client, nameof(client));
return With<AppClients>(id, client);
}
@ -46,7 +46,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClients Add(string id, string secret)
{
Guard.NotNullOrEmpty(id);
Guard.NotNullOrEmpty(id, nameof(id));
if (ContainsKey(id))
{
@ -59,7 +59,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClients Rename(string id, string newName)
{
Guard.NotNullOrEmpty(id);
Guard.NotNullOrEmpty(id, nameof(id));
if (!TryGetValue(id, out var client))
{
@ -72,7 +72,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppClients Update(string id, string role)
{
Guard.NotNullOrEmpty(id);
Guard.NotNullOrEmpty(id, nameof(id));
if (!TryGetValue(id, out var client))
{

6
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppContributors.cs

@ -28,8 +28,8 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppContributors Assign(string contributorId, string role)
{
Guard.NotNullOrEmpty(contributorId);
Guard.NotNullOrEmpty(role);
Guard.NotNullOrEmpty(contributorId, nameof(contributorId));
Guard.NotNullOrEmpty(role, nameof(role));
return With<AppContributors>(contributorId, role, EqualityComparer<string>.Default);
}
@ -37,7 +37,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppContributors Remove(string contributorId)
{
Guard.NotNullOrEmpty(contributorId);
Guard.NotNullOrEmpty(contributorId, nameof(contributorId));
return Without<AppContributors>(contributorId);
}

2
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppImage.cs

@ -18,7 +18,7 @@ namespace Squidex.Domain.Apps.Core.Apps
public AppImage(string mimeType, string? etag = null)
{
Guard.NotNullOrEmpty(mimeType);
Guard.NotNullOrEmpty(mimeType, nameof(mimeType));
MimeType = mimeType;

2
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPattern.cs

@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Core.Apps
public AppPattern(string name, string pattern, string? message = null)
: base(name)
{
Guard.NotNullOrEmpty(pattern);
Guard.NotNullOrEmpty(pattern, nameof(pattern));
Pattern = pattern;

4
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPatterns.cs

@ -43,8 +43,8 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public AppPatterns Update(Guid id, string name, string pattern, string? message = null)
{
Guard.NotNullOrEmpty(name);
Guard.NotNullOrEmpty(pattern);
Guard.NotNullOrEmpty(name, nameof(name));
Guard.NotNullOrEmpty(pattern, nameof(pattern));
if (!TryGetValue(id, out var appPattern))
{

4
backend/src/Squidex.Domain.Apps.Core.Model/Apps/AppPlan.cs

@ -18,8 +18,8 @@ namespace Squidex.Domain.Apps.Core.Apps
public AppPlan(RefToken owner, string planId)
{
Guard.NotNull(owner);
Guard.NotNullOrEmpty(planId);
Guard.NotNull(owner, nameof(owner));
Guard.NotNullOrEmpty(planId, nameof(planId));
Owner = owner;

10
backend/src/Squidex.Domain.Apps.Core.Model/Apps/LanguagesConfig.cs

@ -43,8 +43,8 @@ namespace Squidex.Domain.Apps.Core.Apps
public LanguagesConfig(Dictionary<string, LanguageConfig> languages, string master)
{
Guard.NotNull(languages);
Guard.NotNullOrEmpty(master);
Guard.NotNull(languages, nameof(languages));
Guard.NotNullOrEmpty(master, nameof(master));
Cleanup(languages, ref master);
@ -56,7 +56,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public LanguagesConfig MakeMaster(Language language)
{
Guard.NotNull(language);
Guard.NotNull(language, nameof(language));
return Build(languages, language);
}
@ -64,7 +64,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public LanguagesConfig Set(Language language, bool isOptional = false, params Language[]? fallbacks)
{
Guard.NotNull(language);
Guard.NotNull(language, nameof(language));
var newLanguages = new Dictionary<string, LanguageConfig>(languages)
{
@ -77,7 +77,7 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public LanguagesConfig Remove(Language language)
{
Guard.NotNull(language);
Guard.NotNull(language, nameof(language));
var newLanguages = new Dictionary<string, LanguageConfig>(languages);

2
backend/src/Squidex.Domain.Apps.Core.Model/Apps/Role.cs

@ -34,7 +34,7 @@ namespace Squidex.Domain.Apps.Core.Apps
public Role(string name, PermissionSet permissions)
: base(name)
{
Guard.NotNull(permissions);
Guard.NotNull(permissions, nameof(permissions));
Permissions = permissions;
}

6
backend/src/Squidex.Domain.Apps.Core.Model/Apps/Roles.cs

@ -107,8 +107,8 @@ namespace Squidex.Domain.Apps.Core.Apps
[Pure]
public Roles Update(string name, params string[] permissions)
{
Guard.NotNullOrEmpty(name);
Guard.NotNull(permissions);
Guard.NotNullOrEmpty(name, nameof(name));
Guard.NotNull(permissions, nameof(permissions));
if (!inner.TryGetValue(name, out var role))
{
@ -140,7 +140,7 @@ namespace Squidex.Domain.Apps.Core.Apps
public bool TryGet(string app, string name, [MaybeNullWhen(false)] out Role value)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
if (Defaults.TryGetValue(name, out var role) || inner.TryGetValue(name, out role))
{

6
backend/src/Squidex.Domain.Apps.Core.Model/Comments/Comment.cs

@ -25,9 +25,9 @@ namespace Squidex.Domain.Apps.Core.Comments
public Comment(Guid id, Instant time, RefToken user, string text, Uri? url = null)
{
Guard.NotEmpty(id);
Guard.NotNull(user);
Guard.NotNull(text);
Guard.NotEmpty(id, nameof(id));
Guard.NotNull(user, nameof(user));
Guard.NotNull(text, nameof(text));
Id = id;
Text = text;

2
backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentData.cs

@ -37,7 +37,7 @@ namespace Squidex.Domain.Apps.Core.Contents
protected static TResult MergeTo<TResult>(TResult target, params TResult[] sources) where TResult : ContentData<T>
{
Guard.NotEmpty(sources);
Guard.NotEmpty(sources, nameof(sources));
if (sources.Length == 1 || sources.Skip(1).All(x => ReferenceEquals(x, sources[0])))
{

2
backend/src/Squidex.Domain.Apps.Core.Model/Contents/ContentFieldData.cs

@ -48,7 +48,7 @@ namespace Squidex.Domain.Apps.Core.Contents
public ContentFieldData AddJsonValue(string key, IJsonValue value)
{
Guard.NotNullOrEmpty(key);
Guard.NotNullOrEmpty(key, nameof(key));
if (Language.IsValidLanguage(key))
{

2
backend/src/Squidex.Domain.Apps.Core.Model/Contents/IdContentData.cs

@ -40,7 +40,7 @@ namespace Squidex.Domain.Apps.Core.Contents
public IdContentData AddField(long id, ContentFieldData? data)
{
Guard.GreaterThan(id, 0);
Guard.GreaterThan(id, 0, nameof(id));
this[id] = data;

2
backend/src/Squidex.Domain.Apps.Core.Model/Contents/NamedContentData.cs

@ -44,7 +44,7 @@ namespace Squidex.Domain.Apps.Core.Contents
public NamedContentData AddField(string name, ContentFieldData? data)
{
Guard.NotNullOrEmpty(name);
Guard.NotNullOrEmpty(name, nameof(name));
this[name] = data;

8
backend/src/Squidex.Domain.Apps.Core.Model/Contents/Workflows.cs

@ -36,7 +36,7 @@ namespace Squidex.Domain.Apps.Core.Contents
[Pure]
public Workflows Add(Guid workflowId, string name)
{
Guard.NotNullOrEmpty(name);
Guard.NotNullOrEmpty(name, nameof(name));
return With<Workflows>(workflowId, Workflow.CreateDefault(name));
}
@ -44,7 +44,7 @@ namespace Squidex.Domain.Apps.Core.Contents
[Pure]
public Workflows Set(Workflow workflow)
{
Guard.NotNull(workflow);
Guard.NotNull(workflow, nameof(workflow));
return With<Workflows>(Guid.Empty, workflow);
}
@ -52,7 +52,7 @@ namespace Squidex.Domain.Apps.Core.Contents
[Pure]
public Workflows Set(Guid id, Workflow workflow)
{
Guard.NotNull(workflow);
Guard.NotNull(workflow, nameof(workflow));
return With<Workflows>(id, workflow);
}
@ -60,7 +60,7 @@ namespace Squidex.Domain.Apps.Core.Contents
[Pure]
public Workflows Update(Guid id, Workflow workflow)
{
Guard.NotNull(workflow);
Guard.NotNull(workflow, nameof(workflow));
if (id == Guid.Empty)
{

2
backend/src/Squidex.Domain.Apps.Core.Model/Named.cs

@ -15,7 +15,7 @@ namespace Squidex.Domain.Apps.Core
protected Named(string name)
{
Guard.NotNullOrEmpty(name);
Guard.NotNullOrEmpty(name, nameof(name));
Name = name;
}

2
backend/src/Squidex.Domain.Apps.Core.Model/Partitioning.cs

@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Core
public Partitioning(string key)
{
Guard.NotNullOrEmpty(key);
Guard.NotNullOrEmpty(key, nameof(key));
Key = key;
}

8
backend/src/Squidex.Domain.Apps.Core.Model/Rules/Rule.cs

@ -40,8 +40,8 @@ namespace Squidex.Domain.Apps.Core.Rules
public Rule(RuleTrigger trigger, RuleAction action)
{
Guard.NotNull(trigger);
Guard.NotNull(action);
Guard.NotNull(trigger, nameof(trigger));
Guard.NotNull(action, nameof(action));
SetTrigger(trigger);
SetAction(action);
@ -92,7 +92,7 @@ namespace Squidex.Domain.Apps.Core.Rules
[Pure]
public Rule Update(RuleTrigger newTrigger)
{
Guard.NotNull(newTrigger);
Guard.NotNull(newTrigger, nameof(newTrigger));
if (newTrigger.GetType() != trigger.GetType())
{
@ -113,7 +113,7 @@ namespace Squidex.Domain.Apps.Core.Rules
[Pure]
public Rule Update(RuleAction newAction)
{
Guard.NotNull(newAction);
Guard.NotNull(newAction, nameof(newAction));
if (newAction.GetType() != action.GetType())
{

2
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/ArrayField.cs

@ -44,7 +44,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
public ArrayField(long id, string name, Partitioning partitioning, NestedField[] fields, ArrayFieldProperties? properties = null, IFieldSettings? settings = null)
: this(id, name, partitioning, properties, settings)
{
Guard.NotNull(fields);
Guard.NotNull(fields, nameof(fields));
this.fields = new FieldCollection<NestedField>(fields);
}

8
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldCollection.cs

@ -78,7 +78,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
public FieldCollection(T[] fields)
{
Guard.NotNull(fields);
Guard.NotNull(fields, nameof(fields));
fieldsOrdered = fields;
}
@ -106,7 +106,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
[Pure]
public FieldCollection<T> Reorder(List<long> ids)
{
Guard.NotNull(ids);
Guard.NotNull(ids, nameof(ids));
if (ids.Count != fieldsOrdered.Length || ids.Any(x => !ById.ContainsKey(x)))
{
@ -127,7 +127,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
[Pure]
public FieldCollection<T> Add(T field)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
if (ByName.ContainsKey(field.Name))
{
@ -148,7 +148,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
[Pure]
public FieldCollection<T> Update(long fieldId, Func<T, T> updater)
{
Guard.NotNull(updater);
Guard.NotNull(updater, nameof(updater));
if (!ById.TryGetValue(fieldId, out var field))
{

4
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField.cs

@ -47,8 +47,8 @@ namespace Squidex.Domain.Apps.Core.Schemas
protected NestedField(long id, string name, IFieldSettings? settings = null)
{
Guard.NotNullOrEmpty(name);
Guard.GreaterThan(id, 0);
Guard.NotNullOrEmpty(name, nameof(name));
Guard.GreaterThan(id, 0, nameof(id));
fieldId = id;
fieldName = name;

2
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/NestedField{T}.cs

@ -57,7 +57,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
private T ValidateProperties(FieldProperties newProperties)
{
Guard.NotNull(newProperties);
Guard.NotNull(newProperties, nameof(newProperties));
if (!(newProperties is T typedProperties))
{

6
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField.cs

@ -53,9 +53,9 @@ namespace Squidex.Domain.Apps.Core.Schemas
protected RootField(long id, string name, Partitioning partitioning, IFieldSettings? settings = null)
{
Guard.NotNullOrEmpty(name);
Guard.GreaterThan(id, 0);
Guard.NotNull(partitioning);
Guard.NotNullOrEmpty(name, nameof(name));
Guard.GreaterThan(id, 0, nameof(id));
Guard.NotNull(partitioning, nameof(partitioning));
fieldId = id;
fieldName = name;

2
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/RootField{T}.cs

@ -55,7 +55,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
private T ValidateProperties(FieldProperties newProperties)
{
Guard.NotNull(newProperties);
Guard.NotNull(newProperties, nameof(newProperties));
if (!(newProperties is T typedProperties))
{

4
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs

@ -94,7 +94,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
public Schema(string name, SchemaProperties? properties = null, bool isSingleton = false)
{
Guard.NotNullOrEmpty(name);
Guard.NotNullOrEmpty(name, nameof(name));
this.name = name;
@ -107,7 +107,7 @@ namespace Squidex.Domain.Apps.Core.Schemas
public Schema(string name, RootField[] fields, SchemaProperties properties, bool isPublished, bool isSingleton = false)
: this(name, properties, isSingleton)
{
Guard.NotNull(fields);
Guard.NotNull(fields, nameof(fields));
this.fields = new FieldCollection<RootField>(fields);

1
backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Squidex.Domain.Apps.Core</RootNamespace>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

6
backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/ContentConverter.cs

@ -17,7 +17,7 @@ namespace Squidex.Domain.Apps.Core.ConvertContent
{
public static NamedContentData ConvertId2Name(this IdContentData content, Schema schema, params FieldConverter[] converters)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var result = new NamedContentData(content.Count);
@ -48,7 +48,7 @@ namespace Squidex.Domain.Apps.Core.ConvertContent
public static NamedContentData ConvertName2Name(this NamedContentData content, Schema schema, params FieldConverter[] converters)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var result = new NamedContentData(content.Count);
@ -77,7 +77,7 @@ namespace Squidex.Domain.Apps.Core.ConvertContent
public static IdContentData ConvertName2IdCloned(this NamedContentData content, Schema schema, params FieldConverter[] converters)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var result = new IdContentData(content.Count);

2
backend/src/Squidex.Domain.Apps.Core.Operations/ConvertContent/StringFormatter.cs

@ -22,7 +22,7 @@ namespace Squidex.Domain.Apps.Core.ConvertContent
public static string Format(IJsonValue? value, IField field)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
if (value == null || value is JsonNull)
{

2
backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs

@ -24,7 +24,7 @@ namespace Squidex.Domain.Apps.Core.DefaultValues
public static IJsonValue CreateDefaultValue(IField field, Instant now)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
return field.Accept(new DefaultValueFactory(now));
}

8
backend/src/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueGenerator.cs

@ -20,8 +20,8 @@ namespace Squidex.Domain.Apps.Core.DefaultValues
public DefaultValueGenerator(Schema schema, PartitionResolver partitionResolver)
{
Guard.NotNull(schema);
Guard.NotNull(partitionResolver);
Guard.NotNull(schema, nameof(schema));
Guard.NotNull(partitionResolver, nameof(partitionResolver));
this.schema = schema;
@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Core.DefaultValues
public void Enrich(NamedContentData data)
{
Guard.NotNull(data);
Guard.NotNull(data, nameof(data));
foreach (var field in schema.Fields)
{
@ -55,7 +55,7 @@ namespace Squidex.Domain.Apps.Core.DefaultValues
private static void Enrich(IField field, ContentFieldData fieldData, string partitionKey)
{
Guard.NotNull(fieldData);
Guard.NotNull(fieldData, nameof(fieldData));
var defaultValue = DefaultValueFactory.CreateDefaultValue(field, SystemClock.Instance.GetCurrentInstant());

4
backend/src/Squidex.Domain.Apps.Core.Operations/EventSynchronization/SchemaSynchronizer.cs

@ -21,8 +21,8 @@ namespace Squidex.Domain.Apps.Core.EventSynchronization
public static IEnumerable<IEvent> Synchronize(this Schema source, Schema? target, Func<long> idGenerator,
SchemaSynchronizationOptions? options = null)
{
Guard.NotNull(source);
Guard.NotNull(idGenerator);
Guard.NotNull(source, nameof(source));
Guard.NotNull(idGenerator, nameof(idGenerator));
if (target == null)
{

14
backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ContentReferencesExtensions.cs

@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
{
public static HashSet<Guid> GetReferencedIds(this NamedContentData source, Schema schema, int referencesPerField = int.MaxValue)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var extractor = new ReferencesExtractor(new HashSet<Guid>(), referencesPerField);
@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public static void AddReferencedIds(this NamedContentData source, Schema schema, HashSet<Guid> result, int referencesPerField = int.MaxValue)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var extractor = new ReferencesExtractor(result, referencesPerField);
@ -39,7 +39,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public static void AddReferencedIds(this NamedContentData source, IEnumerable<IField> fields, HashSet<Guid> result, int referencesPerField = int.MaxValue)
{
Guard.NotNull(fields);
Guard.NotNull(fields, nameof(fields));
var extractor = new ReferencesExtractor(result, referencesPerField);
@ -48,7 +48,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public static void AddReferencedIds(this NamedContentData source, IField field, HashSet<Guid> result, int referencesPerField = int.MaxValue)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
var extractor = new ReferencesExtractor(result, referencesPerField);
@ -94,8 +94,8 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public static JsonObject FormatReferences(this NamedContentData data, Schema schema, IFieldPartitioning partitioning, string separator = ", ")
{
Guard.NotNull(schema);
Guard.NotNull(partitioning);
Guard.NotNull(schema, nameof(schema));
Guard.NotNull(partitioning, nameof(partitioning));
var result = JsonValue.Object();
@ -109,7 +109,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
private static string FormatReferenceFields(this NamedContentData data, Schema schema, string partitionKey, string separator)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var sb = new StringBuilder();

2
backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesCleaner.cs

@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public ReferencesCleaner(HashSet<Guid> validIds)
{
Guard.NotNull(validIds);
Guard.NotNull(validIds, nameof(validIds));
this.validIds = validIds;
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ExtractReferenceIds/ReferencesExtractor.cs

@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Core.ExtractReferenceIds
public ReferencesExtractor(HashSet<Guid> result, int take)
{
Guard.NotNull(result);
Guard.NotNull(result, nameof(result));
this.result = result;

4
backend/src/Squidex.Domain.Apps.Core.Operations/GenerateEdmSchema/EdmSchemaExtensions.cs

@ -27,8 +27,8 @@ namespace Squidex.Domain.Apps.Core.GenerateEdmSchema
public static EdmComplexType BuildEdmType(this Schema schema, bool withHidden, PartitionResolver partitionResolver, EdmTypeFactory typeFactory)
{
Guard.NotNull(typeFactory);
Guard.NotNull(partitionResolver);
Guard.NotNull(typeFactory, nameof(typeFactory));
Guard.NotNull(partitionResolver, nameof(partitionResolver));
var (edmType, _) = typeFactory("Data");

4
backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/ContentSchemaBuilder.cs

@ -15,8 +15,8 @@ namespace Squidex.Domain.Apps.Core.GenerateJsonSchema
{
public JsonSchema CreateContentSchema(Schema schema, JsonSchema dataSchema)
{
Guard.NotNull(schema);
Guard.NotNull(dataSchema);
Guard.NotNull(schema, nameof(schema));
Guard.NotNull(dataSchema, nameof(dataSchema));
var schemaName = schema.Properties.Label.WithFallback(schema.Name);

4
backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonSchemaExtensions.cs

@ -15,8 +15,8 @@ namespace Squidex.Domain.Apps.Core.GenerateJsonSchema
{
public static JsonSchema BuildJsonSchema(this Schema schema, PartitionResolver partitionResolver, SchemaResolver schemaResolver, bool withHidden = false)
{
Guard.NotNull(schemaResolver);
Guard.NotNull(partitionResolver);
Guard.NotNull(schemaResolver, nameof(schemaResolver));
Guard.NotNull(partitionResolver, nameof(partitionResolver));
var schemaName = schema.Name.ToPascalCase();

4
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/EventEnricher.cs

@ -24,8 +24,8 @@ namespace Squidex.Domain.Apps.Core.HandleRules
public EventEnricher(IMemoryCache userCache, IUserResolver userResolver)
{
Guard.NotNull(userCache);
Guard.NotNull(userResolver);
Guard.NotNull(userCache, nameof(userCache));
Guard.NotNull(userResolver, nameof(userResolver));
this.userCache = userCache;
this.userResolver = userResolver;

2
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionHandler.cs

@ -32,7 +32,7 @@ namespace Squidex.Domain.Apps.Core.HandleRules
protected RuleActionHandler(RuleEventFormatter formatter)
{
Guard.NotNull(formatter);
Guard.NotNull(formatter, nameof(formatter));
this.formatter = formatter;
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleActionRegistration.cs

@ -16,7 +16,7 @@ namespace Squidex.Domain.Apps.Core.HandleRules
internal RuleActionRegistration(Type actionType)
{
Guard.NotNull(actionType);
Guard.NotNull(actionType, nameof(actionType));
ActionType = actionType;
}

6
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleEventFormatter.cs

@ -37,9 +37,9 @@ namespace Squidex.Domain.Apps.Core.HandleRules
public RuleEventFormatter(IJsonSerializer jsonSerializer, IUrlGenerator urlGenerator, IScriptEngine scriptEngine)
{
Guard.NotNull(jsonSerializer);
Guard.NotNull(scriptEngine);
Guard.NotNull(urlGenerator);
Guard.NotNull(jsonSerializer, nameof(jsonSerializer));
Guard.NotNull(scriptEngine, nameof(scriptEngine));
Guard.NotNull(urlGenerator, nameof(urlGenerator));
this.jsonSerializer = jsonSerializer;
this.scriptEngine = scriptEngine;

20
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs

@ -44,14 +44,14 @@ namespace Squidex.Domain.Apps.Core.HandleRules
ISemanticLog log,
TypeNameRegistry typeNameRegistry)
{
Guard.NotNull(jsonSerializer);
Guard.NotNull(ruleOptions);
Guard.NotNull(ruleTriggerHandlers);
Guard.NotNull(ruleActionHandlers);
Guard.NotNull(typeNameRegistry);
Guard.NotNull(eventEnricher);
Guard.NotNull(clock);
Guard.NotNull(log);
Guard.NotNull(jsonSerializer, nameof(jsonSerializer));
Guard.NotNull(ruleOptions, nameof(ruleOptions));
Guard.NotNull(ruleTriggerHandlers, nameof(ruleTriggerHandlers));
Guard.NotNull(ruleActionHandlers, nameof(ruleActionHandlers));
Guard.NotNull(typeNameRegistry, nameof(typeNameRegistry));
Guard.NotNull(eventEnricher, nameof(eventEnricher));
Guard.NotNull(clock, nameof(clock));
Guard.NotNull(log, nameof(log));
this.typeNameRegistry = typeNameRegistry;
@ -69,8 +69,8 @@ namespace Squidex.Domain.Apps.Core.HandleRules
public virtual async Task<List<RuleJob>> CreateJobsAsync(Rule rule, Guid ruleId, Envelope<IEvent> @event, bool ignoreStale = false)
{
Guard.NotNull(rule);
Guard.NotNull(@event);
Guard.NotNull(rule, nameof(rule));
Guard.NotNull(@event, nameof(@event));
var result = new List<RuleJob>();

2
backend/src/Squidex.Domain.Apps.Core.Operations/HandleRules/Scripting/EventScriptExtension.cs

@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Core.HandleRules.Scripting
public EventScriptExtension(IUrlGenerator urlGenerator)
{
Guard.NotNull(urlGenerator);
Guard.NotNull(urlGenerator, nameof(urlGenerator));
this.urlGenerator = urlGenerator;
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Extensions/HttpScriptExtension.cs

@ -23,7 +23,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Extensions
public HttpScriptExtension(IHttpClientFactory httpClientFactory)
{
Guard.NotNull(httpClientFactory);
Guard.NotNull(httpClientFactory, nameof(httpClientFactory));
this.httpClientFactory = httpClientFactory;
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/Internal/Parser.cs

@ -25,7 +25,7 @@ namespace Squidex.Domain.Apps.Core.Scripting.Internal
public Parser(IMemoryCache memoryCache)
{
Guard.NotNull(memoryCache);
Guard.NotNull(memoryCache, nameof(memoryCache));
this.memoryCache = memoryCache;
}

24
backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs

@ -42,8 +42,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public async Task ExecuteAsync(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
using (var cts = new CancellationTokenSource(ExecutionTimeout))
{
@ -75,8 +75,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public async Task<NamedContentData> ExecuteAndTransformAsync(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
using (var cts = new CancellationTokenSource(ExecutionTimeout))
{
@ -128,8 +128,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public async Task<NamedContentData> TransformAsync(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
using (var cts = new CancellationTokenSource(ExecutionTimeout))
{
@ -178,8 +178,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public bool Evaluate(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
try
{
@ -199,8 +199,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public string? Interpolate(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
try
{
@ -220,8 +220,8 @@ namespace Squidex.Domain.Apps.Core.Scripting
public Task<IJsonValue> GetAsync(ScriptContext context, string script)
{
Guard.NotNull(context);
Guard.NotNullOrEmpty(script);
Guard.NotNull(context, nameof(context));
Guard.NotNullOrEmpty(script, nameof(script));
using (var cts = new CancellationTokenSource(ExecutionTimeout))
{

10
backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagNormalizer.cs

@ -19,9 +19,9 @@ namespace Squidex.Domain.Apps.Core.Tags
{
public static async Task NormalizeAsync(this ITagService tagService, Guid appId, Guid schemaId, Schema schema, NamedContentData newData, NamedContentData? oldData)
{
Guard.NotNull(tagService);
Guard.NotNull(schema);
Guard.NotNull(newData);
Guard.NotNull(tagService, nameof(tagService));
Guard.NotNull(schema, nameof(schema));
Guard.NotNull(newData, nameof(newData));
var newValues = new HashSet<string>();
var newArrays = new List<JsonArray>();
@ -55,8 +55,8 @@ namespace Squidex.Domain.Apps.Core.Tags
public static async Task DenormalizeAsync(this ITagService tagService, Guid appId, Guid schemaId, Schema schema, params NamedContentData[] datas)
{
Guard.NotNull(tagService);
Guard.NotNull(schema);
Guard.NotNull(tagService, nameof(tagService));
Guard.NotNull(schema, nameof(schema));
var tagsValues = new HashSet<string>();
var tagsArrays = new List<JsonArray>();

12
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ContentValidator.cs

@ -34,9 +34,9 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public ContentValidator(PartitionResolver partitionResolver, ValidationContext context, IEnumerable<IValidatorsFactory> factories)
{
Guard.NotNull(context);
Guard.NotNull(factories);
Guard.NotNull(partitionResolver);
Guard.NotNull(context, nameof(context));
Guard.NotNull(factories, nameof(factories));
Guard.NotNull(partitionResolver, nameof(partitionResolver));
this.context = context;
this.factories = factories;
@ -52,7 +52,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public Task ValidateInputPartialAsync(NamedContentData data)
{
Guard.NotNull(data);
Guard.NotNull(data, nameof(data));
var validator = CreateSchemaValidator(true);
@ -61,7 +61,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public Task ValidateInputAsync(NamedContentData data)
{
Guard.NotNull(data);
Guard.NotNull(data, nameof(data));
var validator = CreateSchemaValidator(false);
@ -70,7 +70,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public Task ValidateContentAsync(NamedContentData data)
{
Guard.NotNull(data);
Guard.NotNull(data, nameof(data));
var validator = new AggregateValidator(CreateContentValidators());

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultFieldValueValidatorsFactory.cs

@ -26,7 +26,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public static IEnumerable<IValidator> CreateValidators(IField field, FieldValidatorFactory createFieldValidator)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
var visitor = new DefaultFieldValueValidatorsFactory(createFieldValidator);

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/FieldBagValidatorsFactory.cs

@ -22,7 +22,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent
public static IEnumerable<IValidator> CreateValidators(IField field)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
return field.Accept(Instance);
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs

@ -23,7 +23,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public AllowedValuesValidator(IEnumerable<T> allowedValues)
{
Guard.NotNull(allowedValues);
Guard.NotNull(allowedValues, nameof(allowedValues));
this.allowedValues = allowedValues;
}

4
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs

@ -24,8 +24,8 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public AssetsValidator(AssetsFieldProperties properties, CheckAssets checkAssets)
{
Guard.NotNull(properties);
Guard.NotNull(checkAssets);
Guard.NotNull(properties, nameof(properties));
Guard.NotNull(checkAssets, nameof(checkAssets));
this.properties = properties;

4
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs

@ -18,8 +18,8 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public CollectionItemValidator(params IValidator[] itemValidators)
{
Guard.NotNull(itemValidators);
Guard.NotEmpty(itemValidators);
Guard.NotNull(itemValidators, nameof(itemValidators));
Guard.NotEmpty(itemValidators, nameof(itemValidators));
this.itemValidators = itemValidators;
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs

@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public FieldValidator(IEnumerable<IValidator> validators, IField field)
{
Guard.NotNull(field);
Guard.NotNull(field, nameof(field));
this.validators = validators.ToArray();

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs

@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public PatternValidator(string pattern, string? errorMessage = null)
{
Guard.NotNullOrEmpty(pattern);
Guard.NotNullOrEmpty(pattern, nameof(pattern));
this.errorMessage = errorMessage;

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs

@ -22,7 +22,7 @@ namespace Squidex.Domain.Apps.Core.ValidateContent.Validators
public ReferencesValidator(IEnumerable<Guid>? schemaIds, CheckContentsByIds checkReferences)
{
Guard.NotNull(checkReferences);
Guard.NotNull(checkReferences, nameof(checkReferences));
this.schemaIds = schemaIds;

4
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollectionAll.cs

@ -71,7 +71,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents
public async Task<IResultList<IContentEntity>> QueryAsync(IAppEntity app, ISchemaEntity schema, HashSet<Guid> ids)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
using (Profiler.TraceMethod<MongoContentRepository>("QueryAsyncByIds"))
{
@ -83,7 +83,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents
public async Task<List<(IContentEntity Content, ISchemaEntity Schema)>> QueryAsync(IAppEntity app, HashSet<Guid> ids)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
using (Profiler.TraceMethod<MongoContentRepository>("QueryAsyncByIdsWithoutSchema"))
{

4
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollectionPublished.cs

@ -75,7 +75,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents
public async Task<IResultList<IContentEntity>> QueryAsync(IAppEntity app, ISchemaEntity schema, HashSet<Guid> ids)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
using (Profiler.TraceMethod<MongoContentRepository>("QueryAsyncByIds"))
{
@ -87,7 +87,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents
public async Task<List<(IContentEntity Content, ISchemaEntity Schema)>> QueryAsync(IAppEntity app, HashSet<Guid> ids)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
using (Profiler.TraceMethod<MongoContentRepository>("QueryAsyncByIdsWithoutSchema"))
{

4
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentRepository.cs

@ -37,8 +37,8 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents
public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider, ITextIndex indexer, IJsonSerializer serializer)
{
Guard.NotNull(appProvider);
Guard.NotNull(serializer);
Guard.NotNull(appProvider, nameof(appProvider));
Guard.NotNull(serializer, nameof(serializer));
this.appProvider = appProvider;

2
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContent.cs

@ -25,7 +25,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations
public async Task<IContentEntity?> DoAsync(ISchemaEntity schema, Guid id)
{
Guard.NotNull(schema);
Guard.NotNull(schema, nameof(schema));
var find = Collection.Find(x => x.Id == id);

2
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContentsByIds.cs

@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations
public async Task<List<(IContentEntity Content, ISchemaEntity Schema)>> DoAsync(Guid appId, ISchemaEntity? schema, HashSet<Guid> ids)
{
Guard.NotNull(ids);
Guard.NotNull(ids, nameof(ids));
var find = Collection.Find(CreateFilter(appId, ids));

6
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContentsByQuery.cs

@ -46,9 +46,9 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations
public async Task<IResultList<IContentEntity>> DoAsync(IAppEntity app, ISchemaEntity schema, ClrQuery query, SearchScope scope)
{
Guard.NotNull(app);
Guard.NotNull(schema);
Guard.NotNull(query);
Guard.NotNull(app, nameof(app));
Guard.NotNull(schema, nameof(schema));
Guard.NotNull(query, nameof(query));
try
{

2
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryScheduledContents.cs

@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations
public Task DoAsync(Instant now, Func<IContentEntity, Task> callback)
{
Guard.NotNull(callback);
Guard.NotNull(callback, nameof(callback));
return Collection.Find(x => x.ScheduledAt < now && x.IsDeleted != true)
.Not(x => x.DataByIds)

2
backend/src/Squidex.Domain.Apps.Entities.MongoDb/FullText/MongoIndexStorage.cs

@ -24,7 +24,7 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.FullText
public MongoIndexStorage(IGridFSBucket<string> bucket)
{
Guard.NotNull(bucket);
Guard.NotNull(bucket, nameof(bucket));
this.bucket = bucket;
}

4
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs

@ -107,8 +107,8 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Rules
public async Task UpdateAsync(RuleJob job, RuleJobUpdate update)
{
Guard.NotNull(job);
Guard.NotNull(update);
Guard.NotNull(job, nameof(job));
Guard.NotNull(update, nameof(update));
if (update.ExecutionResult == RuleResult.Success)
{

8
backend/src/Squidex.Domain.Apps.Entities/AppProvider.cs

@ -29,10 +29,10 @@ namespace Squidex.Domain.Apps.Entities
public AppProvider(ILocalCache localCache, IAppsIndex indexForApps, IRulesIndex indexRules, ISchemasIndex indexSchemas)
{
Guard.NotNull(indexForApps);
Guard.NotNull(indexRules);
Guard.NotNull(indexSchemas);
Guard.NotNull(localCache);
Guard.NotNull(indexForApps, nameof(indexForApps));
Guard.NotNull(indexRules, nameof(indexRules));
Guard.NotNull(indexSchemas, nameof(indexSchemas));
Guard.NotNull(localCache, nameof(localCache));
this.localCache = localCache;
this.indexForApps = indexForApps;

6
backend/src/Squidex.Domain.Apps.Entities/Apps/AppCommandMiddleware.cs

@ -28,9 +28,9 @@ namespace Squidex.Domain.Apps.Entities.Apps
IContextProvider contextProvider)
: base(grainFactory)
{
Guard.NotNull(contextProvider);
Guard.NotNull(appImageStore);
Guard.NotNull(assetThumbnailGenerator);
Guard.NotNull(contextProvider, nameof(contextProvider));
Guard.NotNull(appImageStore, nameof(appImageStore));
Guard.NotNull(assetThumbnailGenerator, nameof(assetThumbnailGenerator));
this.appImageStore = appImageStore;
this.assetThumbnailGenerator = assetThumbnailGenerator;

8
backend/src/Squidex.Domain.Apps.Entities/Apps/AppDomainObject.cs

@ -41,10 +41,10 @@ namespace Squidex.Domain.Apps.Entities.Apps
IUserResolver userResolver)
: base(store, log)
{
Guard.NotNull(initialPatterns);
Guard.NotNull(userResolver);
Guard.NotNull(appPlansProvider);
Guard.NotNull(appPlansBillingManager);
Guard.NotNull(initialPatterns, nameof(initialPatterns));
Guard.NotNull(userResolver, nameof(userResolver));
Guard.NotNull(appPlansProvider, nameof(appPlansProvider));
Guard.NotNull(appPlansBillingManager, nameof(appPlansBillingManager));
this.userResolver = userResolver;
this.appPlansProvider = appPlansProvider;

2
backend/src/Squidex.Domain.Apps.Entities/Apps/AppSettingsSearchSource.cs

@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public AppSettingsSearchSource(IUrlGenerator urlGenerator)
{
Guard.NotNull(urlGenerator);
Guard.NotNull(urlGenerator, nameof(urlGenerator));
this.urlGenerator = urlGenerator;
}

2
backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettings.cs

@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public AppUISettings(IGrainFactory grainFactory)
{
Guard.NotNull(grainFactory);
Guard.NotNull(grainFactory, nameof(grainFactory));
this.grainFactory = grainFactory;
}

4
backend/src/Squidex.Domain.Apps.Entities/Apps/AppUISettingsGrain.cs

@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public AppUISettingsGrain(IGrainState<State> state)
{
Guard.NotNull(state);
Guard.NotNull(state, nameof(state));
this.state = state;
}
@ -72,7 +72,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
private JsonObject? GetContainer(string path, bool add, out string key)
{
Guard.NotNullOrEmpty(path);
Guard.NotNullOrEmpty(path, nameof(path));
var segments = path.Split('.');

6
backend/src/Squidex.Domain.Apps.Entities/Apps/BackupApps.cs

@ -33,9 +33,9 @@ namespace Squidex.Domain.Apps.Entities.Apps
public BackupApps(IAppImageStore appImageStore, IAppsIndex appsIndex, IAppUISettings appUISettings)
{
Guard.NotNull(appImageStore);
Guard.NotNull(appsIndex);
Guard.NotNull(appUISettings);
Guard.NotNull(appImageStore, nameof(appImageStore));
Guard.NotNull(appsIndex, nameof(appsIndex));
Guard.NotNull(appUISettings, nameof(appUISettings));
this.appsIndex = appsIndex;
this.appImageStore = appImageStore;

2
backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppImageStore.cs

@ -20,7 +20,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public DefaultAppImageStore(IAssetStore assetStore)
{
Guard.NotNull(assetStore);
Guard.NotNull(assetStore, nameof(assetStore));
this.assetStore = assetStore;
}

4
backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs

@ -34,7 +34,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public DefaultAppLogStore(IRequestLogStore requestLogStore)
{
Guard.NotNull(requestLogStore);
Guard.NotNull(requestLogStore, nameof(requestLogStore));
this.requestLogStore = requestLogStore;
}
@ -63,7 +63,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public async Task ReadLogAsync(Guid appId, DateTime fromDate, DateTime toDate, Stream stream, CancellationToken ct = default)
{
Guard.NotNull(appId);
Guard.NotNull(appId, nameof(appId));
var writer = new StreamWriter(stream, Encoding.UTF8, 4096, true);
try

2
backend/src/Squidex.Domain.Apps.Entities/Apps/Diagnostics/OrleansAppsHealthCheck.cs

@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Diagnostics
public OrleansAppsHealthCheck(IGrainFactory grainFactory)
{
Guard.NotNull(grainFactory);
Guard.NotNull(grainFactory, nameof(grainFactory));
index = grainFactory.GetGrain<IAppsByNameIndexGrain>(SingleGrain.Id);
}

10
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardApp.cs

@ -17,7 +17,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanCreate(CreateApp command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot create app.", e =>
{
@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUploadImage(UploadAppImage command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot upload image.", e =>
{
@ -43,17 +43,17 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(UpdateApp command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
}
public static void CanRemoveImage(RemoveAppImage command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
}
public static void CanChangePlan(ChangePlan command, AppPlan? plan, IAppPlansProvider appPlans)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot change plan.", e =>
{

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppClients.cs

@ -16,7 +16,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanAttach(AppClients clients, AttachClient command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot attach client.", e =>
{
@ -33,7 +33,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanRevoke(AppClients clients, RevokeClient command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
GetClientOrThrow(clients, command.Id);
@ -48,7 +48,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(AppClients clients, UpdateClient command, Roles roles)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
GetClientOrThrow(clients, command.Id);

4
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppContributors.cs

@ -21,7 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static Task CanAssign(AppContributors contributors, Roles roles, AssignContributor command, IUserResolver users, IAppLimitsPlan? plan)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
return Validate.It(() => "Cannot assign contributor.", async e =>
{
@ -64,7 +64,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanRemove(AppContributors contributors, RemoveContributor command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot remove contributor.", e =>
{

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppLanguages.cs

@ -16,7 +16,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanAdd(LanguagesConfig languages, AddLanguage command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot add language.", e =>
{
@ -35,7 +35,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanRemove(LanguagesConfig languages, RemoveLanguage command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot remove language.", e =>
{
@ -59,7 +59,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(LanguagesConfig languages, UpdateLanguage command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot update language.", e =>
{

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppPatterns.cs

@ -17,7 +17,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanAdd(AppPatterns patterns, AddPattern command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot add pattern.", e =>
{
@ -54,7 +54,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanDelete(AppPatterns patterns, DeletePattern command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
if (!patterns.ContainsKey(command.PatternId))
{
@ -64,7 +64,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(AppPatterns patterns, UpdatePattern command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
if (!patterns.ContainsKey(command.PatternId))
{

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppRoles.cs

@ -18,7 +18,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanAdd(Roles roles, AddRole command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot add role.", e =>
{
@ -35,7 +35,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanDelete(Roles roles, DeleteRole command, AppContributors contributors, AppClients clients)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
CheckRoleExists(roles, command.Name);
@ -64,7 +64,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(Roles roles, UpdateRole command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
CheckRoleExists(roles, command.Name);

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Guards/GuardAppWorkflows.cs

@ -17,7 +17,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
{
public static void CanAdd(AddWorkflow command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
Validate.It(() => "Cannot add workflow.", e =>
{
@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanUpdate(Workflows workflows, UpdateWorkflow command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
CheckWorkflowExists(workflows, command.WorkflowId);
@ -92,7 +92,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Guards
public static void CanDelete(Workflows workflows, DeleteWorkflow command)
{
Guard.NotNull(command);
Guard.NotNull(command, nameof(command));
CheckWorkflowExists(workflows, command.WorkflowId);
}

2
backend/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsIndex.cs

@ -27,7 +27,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Indexes
public AppsIndex(IGrainFactory grainFactory)
{
Guard.NotNull(grainFactory);
Guard.NotNull(grainFactory, nameof(grainFactory));
this.grainFactory = grainFactory;
}

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InvitationEventConsumer.cs

@ -35,9 +35,9 @@ namespace Squidex.Domain.Apps.Entities.Apps.Invitation
public InvitationEventConsumer(INotificationSender emailSender, IUserResolver userResolver, ISemanticLog log)
{
Guard.NotNull(emailSender);
Guard.NotNull(userResolver);
Guard.NotNull(log);
Guard.NotNull(emailSender, nameof(emailSender));
Guard.NotNull(userResolver, nameof(userResolver));
Guard.NotNull(log, nameof(log));
this.emailSender = emailSender;
this.userResolver = userResolver;

2
backend/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs

@ -19,7 +19,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Invitation
public InviteUserCommandMiddleware(IUserResolver userResolver)
{
Guard.NotNull(userResolver);
Guard.NotNull(userResolver, nameof(userResolver));
this.userResolver = userResolver;
}

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/ConfigAppPlansProvider.cs

@ -29,7 +29,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public ConfigAppPlansProvider(IEnumerable<ConfigAppLimitsPlan> config)
{
Guard.NotNull(config);
Guard.NotNull(config, nameof(config));
foreach (var plan in config.OrderBy(x => x.MaxApiCalls).Select(x => x.Clone()))
{
@ -65,7 +65,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public IAppLimitsPlan? GetPlanUpgradeForApp(IAppEntity app)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
return GetPlanUpgrade(app.Plan?.PlanId);
}
@ -86,7 +86,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public (IAppLimitsPlan Plan, string PlanId) GetPlanForApp(IAppEntity app)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
var planId = app.Plan?.PlanId;
var plan = GetPlanCore(planId);

2
backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/RedirectToCheckoutResult.cs

@ -16,7 +16,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public RedirectToCheckoutResult(Uri url)
{
Guard.NotNull(url);
Guard.NotNull(url, nameof(url));
Url = url;
}

8
backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageGate.cs

@ -28,9 +28,9 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public UsageGate(IAppPlansProvider appPlansProvider, IApiUsageTracker apiUsageTracker, IGrainFactory grainFactory)
{
Guard.NotNull(apiUsageTracker);
Guard.NotNull(appPlansProvider);
Guard.NotNull(grainFactory);
Guard.NotNull(apiUsageTracker, nameof(apiUsageTracker));
Guard.NotNull(appPlansProvider, nameof(appPlansProvider));
Guard.NotNull(grainFactory, nameof(grainFactory));
this.appPlansProvider = appPlansProvider;
this.apiUsageTracker = apiUsageTracker;
@ -40,7 +40,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public virtual async Task<bool> IsBlockedAsync(IAppEntity app, DateTime today)
{
Guard.NotNull(app);
Guard.NotNull(app, nameof(app));
var isLocked = false;

6
backend/src/Squidex.Domain.Apps.Entities/Apps/Plans/UsageNotifierGrain.cs

@ -32,9 +32,9 @@ namespace Squidex.Domain.Apps.Entities.Apps.Plans
public UsageNotifierGrain(IGrainState<State> state, INotificationSender notificationSender, IUserResolver userResolver)
{
Guard.NotNull(state);
Guard.NotNull(notificationSender);
Guard.NotNull(userResolver);
Guard.NotNull(state, nameof(state));
Guard.NotNull(notificationSender, nameof(notificationSender));
Guard.NotNull(userResolver, nameof(userResolver));
this.state = state;
this.notificationSender = notificationSender;

2
backend/src/Squidex.Domain.Apps.Entities/Apps/RolePermissionsProvider.cs

@ -22,7 +22,7 @@ namespace Squidex.Domain.Apps.Entities.Apps
public RolePermissionsProvider(IAppProvider appProvider)
{
Guard.NotNull(appProvider);
Guard.NotNull(appProvider, nameof(appProvider));
this.appProvider = appProvider;
}

4
backend/src/Squidex.Domain.Apps.Entities/Assets/AssetChangedTriggerHandler.cs

@ -24,8 +24,8 @@ namespace Squidex.Domain.Apps.Entities.Assets
public AssetChangedTriggerHandler(IScriptEngine scriptEngine, IAssetLoader assetLoader)
{
Guard.NotNull(scriptEngine);
Guard.NotNull(assetLoader);
Guard.NotNull(scriptEngine, nameof(scriptEngine));
Guard.NotNull(assetLoader, nameof(assetLoader));
this.scriptEngine = scriptEngine;

10
backend/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs

@ -33,11 +33,11 @@ namespace Squidex.Domain.Apps.Entities.Assets
IEnumerable<IAssetMetadataSource> assetMetadataSources)
: base(grainFactory)
{
Guard.NotNull(assetEnricher);
Guard.NotNull(assetFileStore);
Guard.NotNull(assetQuery);
Guard.NotNull(assetMetadataSources);
Guard.NotNull(contextProvider);
Guard.NotNull(assetEnricher, nameof(assetEnricher));
Guard.NotNull(assetFileStore, nameof(assetFileStore));
Guard.NotNull(assetQuery, nameof(assetQuery));
Guard.NotNull(assetMetadataSources, nameof(assetMetadataSources));
Guard.NotNull(contextProvider, nameof(contextProvider));
this.assetFileStore = assetFileStore;
this.assetEnricher = assetEnricher;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save