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
// ==========================================================================
|
|
// IdContentData.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Domain.Apps.Core.Contents
|
|
{
|
|
public sealed class IdContentData : ContentData<long>, IEquatable<IdContentData>
|
|
{
|
|
public IdContentData()
|
|
: base(EqualityComparer<long>.Default)
|
|
{
|
|
}
|
|
|
|
public IdContentData(IdContentData copy)
|
|
: base(copy, EqualityComparer<long>.Default)
|
|
{
|
|
}
|
|
|
|
public IdContentData MergeInto(IdContentData target)
|
|
{
|
|
return Merge(new IdContentData(), this, target);
|
|
}
|
|
|
|
public IdContentData ToCleaned()
|
|
{
|
|
return Clean(this, new IdContentData());
|
|
}
|
|
|
|
public IdContentData AddField(long id, ContentFieldData data)
|
|
{
|
|
Guard.GreaterThan(id, 0, nameof(id));
|
|
|
|
this[id] = data;
|
|
|
|
return this;
|
|
}
|
|
|
|
public bool Equals(IdContentData other)
|
|
{
|
|
return base.Equals(other);
|
|
}
|
|
}
|
|
}
|
|
|