Conflicts: src/Umbraco.Core/Configuration/UmbracoSettings.cs src/Umbraco.Core/Models/PropertyExtensions.cs src/Umbraco.Core/Persistence/Repositories/Interfaces/IMemberRepository.cs src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs src/Umbraco.Core/Security/MembershipProviderBase.cs src/Umbraco.Core/Services/ContentService.cs src/Umbraco.Core/Services/MediaService.cs src/Umbraco.Core/Services/PackagingService.cs src/Umbraco.Tests/Models/DataValueSetterTests.cs src/Umbraco.Web.UI/web.Template.config src/umbraco.cms/businesslogic/media/Media.cs src/umbraco.cms/businesslogic/member/Member.cs
25 lines
829 B
C#
25 lines
829 B
C#
using System;
|
|
using System.Xml;
|
|
using System.Xml.Linq;
|
|
using Umbraco.Core.Configuration;
|
|
using Umbraco.Core.PropertyEditors;
|
|
using Umbraco.Core.Services;
|
|
using umbraco.interfaces;
|
|
|
|
namespace Umbraco.Core.Models
|
|
{
|
|
public static class PropertyExtensions
|
|
{
|
|
/// <summary>
|
|
/// Creates the xml representation for the <see cref="Property"/> object
|
|
/// </summary>
|
|
/// <param name="property"><see cref="Property"/> to generate xml for</param>
|
|
/// <returns>Xml of the property and its value</returns>
|
|
public static XElement ToXml(this Property property)
|
|
{
|
|
var xmlSerializer = new EntityXmlSerializer();
|
|
return xmlSerializer.Serialize(ApplicationContext.Current.Services.DataTypeService, property);
|
|
}
|
|
|
|
}
|
|
} |