Fix the build

This commit is contained in:
Stephan
2014-05-16 09:57:21 +02:00
parent 1f88960b3f
commit e07f573683
3 changed files with 14 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ namespace Umbraco.Core.Models
var refProperties = inputType.GetProperties()
.Where(x =>
//is not attributed with the ignore clone attribute
x.GetCustomAttribute<DoNotCloneAttribute>() == null
Attribute.GetCustomAttribute(x, typeof(DoNotCloneAttribute)) == null
//reference type but not string
&& x.PropertyType.IsValueType == false && x.PropertyType != typeof (string)
//settable

View File

@@ -5,6 +5,13 @@
/// </summary>
public class PreValue : IDeepCloneable
{
public PreValue(int id, string value, int sortOrder)
{
Id = id;
Value = value;
SortOrder = sortOrder;
}
public PreValue(int id, string value)
{
Value = value;
@@ -26,6 +33,11 @@
/// </summary>
public int Id { get; private set; }
/// <summary>
/// The sort order stored for the pre-value field value
/// </summary>
public int SortOrder { get; private set; }
public virtual object DeepClone()
{
//Memberwise clone on PreValue will work since it doesn't have any deep elements

View File

@@ -144,9 +144,8 @@ namespace Umbraco.Tests.Persistence.Repositories
var unitOfWork = provider.GetUnitOfWork();
var templateRepository = new TemplateRepository(unitOfWork, NullCacheProvider.Current);
var tagRepository = new TagsRepository(unitOfWork, NullCacheProvider.Current);
var contentTypeRepository = new ContentTypeRepository(unitOfWork, NullCacheProvider.Current, templateRepository);
var contentRepo = new ContentRepository(unitOfWork, NullCacheProvider.Current, contentTypeRepository, templateRepository, tagRepository, CacheHelper.CreateDisabledCacheHelper());
var contentRepo = new ContentRepository(unitOfWork, NullCacheProvider.Current, contentTypeRepository, templateRepository, CacheHelper.CreateDisabledCacheHelper());
using (contentRepo)
{