mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
// ==========================================================================
|
|
// AppPattern.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Diagnostics.Contracts;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Domain.Apps.Core.Apps
|
|
{
|
|
public sealed class AppPattern
|
|
{
|
|
private readonly string name;
|
|
private readonly string pattern;
|
|
private readonly string message;
|
|
|
|
public string Name
|
|
{
|
|
get { return name; }
|
|
}
|
|
|
|
public string Pattern
|
|
{
|
|
get { return pattern; }
|
|
}
|
|
|
|
public string Message
|
|
{
|
|
get { return message; }
|
|
}
|
|
|
|
public AppPattern(string name, string pattern, string message = null)
|
|
{
|
|
Guard.NotNullOrEmpty(name, nameof(name));
|
|
Guard.NotNullOrEmpty(pattern, nameof(pattern));
|
|
|
|
this.name = name;
|
|
this.pattern = pattern;
|
|
this.message = message;
|
|
}
|
|
|
|
[Pure]
|
|
public AppPattern Update(string name, string pattern, string message)
|
|
{
|
|
return new AppPattern(name, pattern, message);
|
|
}
|
|
}
|
|
}
|
|
|