* Rename Umbraco.Core namespace to Umbraco.Cms.Core * Move extension methods in core project to Umbraco.Extensions * Move extension methods in core project to Umbraco.Extensions * Rename Umbraco.Examine namespace to Umbraco.Cms.Examine * Move examine extensions to Umbraco.Extensions namespace * Reflect changed namespaces in Builder and fix unit tests * Adjust namespace in Umbraco.ModelsBuilder.Embedded * Adjust namespace in Umbraco.Persistence.SqlCe * Adjust namespace in Umbraco.PublishedCache.NuCache * Align namespaces in Umbraco.Web.BackOffice * Align namespaces in Umbraco.Web.Common * Ensure that SqlCeSupport is still enabled after changing the namespace * Align namespaces in Umbraco.Web.Website * Align namespaces in Umbraco.Web.UI.NetCore * Align namespaces in Umbraco.Tests.Common * Align namespaces in Umbraco.Tests.UnitTests * Align namespaces in Umbraco.Tests.Integration * Fix errors caused by changed namespaces * Fix integration tests * Undo the Umbraco.Examine.Lucene namespace change This breaks integration tests on linux, since the namespace wont exists there because it's only used on windows. * Fix merge * Fix Merge
54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.Serialization;
|
|
using Umbraco.Cms.Core.Models.Entities;
|
|
|
|
namespace Umbraco.Cms.Core.Models
|
|
{
|
|
/// <summary>
|
|
/// Represents a member type
|
|
/// </summary>
|
|
[Serializable]
|
|
[DataContract(IsReference = true)]
|
|
public class MemberGroup : EntityBase, IMemberGroup
|
|
{
|
|
private IDictionary<string, object> _additionalData;
|
|
private string _name;
|
|
private int _creatorId;
|
|
|
|
/// <inheritdoc />
|
|
[DataMember]
|
|
[DoNotClone]
|
|
public IDictionary<string, object> AdditionalData => _additionalData ?? (_additionalData = new Dictionary<string, object>());
|
|
|
|
/// <inheritdoc />
|
|
[IgnoreDataMember]
|
|
public bool HasAdditionalData => _additionalData != null;
|
|
|
|
[DataMember]
|
|
public string Name
|
|
{
|
|
get => _name;
|
|
set
|
|
{
|
|
if (_name != value)
|
|
{
|
|
//if the name has changed, add the value to the additional data,
|
|
//this is required purely for event handlers to know the previous name of the group
|
|
//so we can keep the public access up to date.
|
|
AdditionalData["previousName"] = _name;
|
|
}
|
|
|
|
SetPropertyValueAndDetectChanges(value, ref _name, nameof(Name));
|
|
}
|
|
}
|
|
|
|
[DataMember]
|
|
public int CreatorId
|
|
{
|
|
get => _creatorId;
|
|
set => SetPropertyValueAndDetectChanges(value, ref _creatorId, nameof(CreatorId));
|
|
}
|
|
}
|
|
}
|