2017-07-20 11:21:28 +02:00
|
|
|
|
using System;
|
2015-01-27 19:47:30 +11:00
|
|
|
|
using System.Runtime.Serialization;
|
2018-01-15 11:32:30 +01:00
|
|
|
|
using Umbraco.Core.Models.Entities;
|
2015-01-27 19:47:30 +11:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
[DataContract(IsReference = true)]
|
2018-01-15 11:32:30 +01:00
|
|
|
|
public class PublicAccessRule : EntityBase
|
2015-01-27 19:47:30 +11:00
|
|
|
|
{
|
2015-01-28 13:16:50 +11:00
|
|
|
|
private string _ruleValue;
|
|
|
|
|
|
private string _ruleType;
|
2015-01-27 19:47:30 +11:00
|
|
|
|
|
|
|
|
|
|
public PublicAccessRule(Guid id, Guid accessEntryId)
|
|
|
|
|
|
{
|
|
|
|
|
|
AccessEntryId = accessEntryId;
|
|
|
|
|
|
Key = id;
|
2015-01-28 18:24:12 +11:00
|
|
|
|
Id = Key.GetHashCode();
|
2015-01-27 19:47:30 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PublicAccessRule()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Guid AccessEntryId { get; internal set; }
|
|
|
|
|
|
|
2015-01-28 13:16:50 +11:00
|
|
|
|
public string RuleValue
|
2015-01-27 19:47:30 +11:00
|
|
|
|
{
|
2019-02-04 19:52:04 +11:00
|
|
|
|
get => _ruleValue;
|
|
|
|
|
|
set => SetPropertyValueAndDetectChanges(value, ref _ruleValue, nameof(RuleValue));
|
2015-01-27 19:47:30 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-01-28 13:16:50 +11:00
|
|
|
|
public string RuleType
|
2015-01-27 19:47:30 +11:00
|
|
|
|
{
|
2019-02-04 19:52:04 +11:00
|
|
|
|
get => _ruleType;
|
|
|
|
|
|
set => SetPropertyValueAndDetectChanges(value, ref _ruleType, nameof(RuleType));
|
2015-01-27 19:47:30 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
2017-07-20 11:21:28 +02:00
|
|
|
|
|
2015-01-27 19:47:30 +11:00
|
|
|
|
}
|
2017-07-20 11:21:28 +02:00
|
|
|
|
}
|