mirror of https://github.com/Squidex/squidex.git
Browse Source
# Conflicts: # src/Squidex/app/shared/components/schema-category.component.ts # src/Squidex/app/shared/state/schemas.state.spec.tspull/375/head
48 changed files with 645 additions and 258 deletions
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<RunSettings> |
|||
<RunConfiguration> |
|||
<MaxCpuCount>4</MaxCpuCount> |
|||
</RunConfiguration> |
|||
</RunSettings> |
|||
@ -0,0 +1,25 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.Collections.Generic; |
|||
|
|||
namespace Squidex.Domain.Apps.Entities.Assets |
|||
{ |
|||
public class AssetResult |
|||
{ |
|||
public IAssetEntity Asset { get; } |
|||
|
|||
public HashSet<string> Tags { get; } |
|||
|
|||
public AssetResult(IAssetEntity asset, HashSet<string> tags) |
|||
{ |
|||
Asset = asset; |
|||
|
|||
Tags = tags; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using Squidex.Infrastructure.Assets; |
|||
|
|||
namespace Squidex.Domain.Apps.Entities.Assets.Commands |
|||
{ |
|||
public abstract class UploadAssetCommand : AssetCommand |
|||
{ |
|||
public AssetFile File { get; set; } |
|||
|
|||
public ImageInfo ImageInfo { get; set; } |
|||
|
|||
public string FileHash { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System; |
|||
using GraphQL.Instrumentation; |
|||
using Squidex.Infrastructure; |
|||
using Squidex.Infrastructure.Log; |
|||
|
|||
namespace Squidex.Domain.Apps.Entities.Contents.GraphQL |
|||
{ |
|||
public static class LoggingMiddleware |
|||
{ |
|||
public static Func<FieldMiddlewareDelegate, FieldMiddlewareDelegate> Create(ISemanticLog log) |
|||
{ |
|||
Guard.NotNull(log, nameof(log)); |
|||
|
|||
return new Func<FieldMiddlewareDelegate, FieldMiddlewareDelegate>(next => |
|||
{ |
|||
return async context => |
|||
{ |
|||
try |
|||
{ |
|||
return await next(context); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
log.LogWarning(ex, w => w |
|||
.WriteProperty("action", "reolveField") |
|||
.WriteProperty("status", "failed") |
|||
.WriteProperty("field", context.FieldName)); |
|||
|
|||
throw ex; |
|||
} |
|||
}; |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue