mirror of https://github.com/Squidex/squidex.git
61 changed files with 236 additions and 98 deletions
@ -0,0 +1,26 @@ |
|||||
|
// ==========================================================================
|
||||
|
// EventTypeAttribute.cs
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex Group
|
||||
|
// All rights reserved.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using System; |
||||
|
|
||||
|
namespace Squidex.Infrastructure.CQRS.Events |
||||
|
{ |
||||
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)] |
||||
|
public sealed class EventTypeAttribute : TypeNameAttribute |
||||
|
{ |
||||
|
public EventTypeAttribute(string typeName, int version = 1) |
||||
|
: base(CreateTypeName(typeName, version)) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
private static string CreateTypeName(string typeName, int version) |
||||
|
{ |
||||
|
return $"{typeName}Event" + (version > 1 ? $"V{version}" : string.Empty); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
// ==========================================================================
|
||||
|
// DocsVM.cs
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex Group
|
||||
|
// All rights reserved.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
namespace Squidex.Controllers |
||||
|
{ |
||||
|
public sealed class DocsVM |
||||
|
{ |
||||
|
public string Specification { get; set; } |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue