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.
46 lines
1.2 KiB
46 lines
1.2 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using Squidex.Infrastructure;
|
|
using System;
|
|
|
|
namespace Squidex.Domain.Apps.Core.Contents
|
|
{
|
|
public struct Status2 : IEquatable<Status2>
|
|
{
|
|
public static readonly Status2 Published = new Status2("Published");
|
|
|
|
public string Name { get; }
|
|
|
|
public Status2(string name)
|
|
{
|
|
Guard.NotNullOrEmpty(name, nameof(name));
|
|
|
|
Name = name;
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is Status2 status && Equals(status);
|
|
}
|
|
|
|
public bool Equals(Status2 other)
|
|
{
|
|
return Name.Equals(other.Name);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return Name;
|
|
}
|
|
}
|
|
}
|
|
|