Started implementing new IPublishedMediaStore which will replace the notion of the legacy ExamineBackedMedia and

moving forward will open up many nice opportunities. This will be used for the media accessor in the new DynamicDocument.
Renamed XmlPublishedContentStore to just DefaultPublishedContentStore.
Made GetProperty an extension method for IDocument and removed from the interface as it is not needed there.
This commit is contained in:
Shannon Deminick
2012-09-08 13:22:45 +07:00
parent ce9be79ec6
commit 27bcea78d2
15 changed files with 286 additions and 63 deletions

View File

@@ -0,0 +1,21 @@
using System.Linq;
namespace Umbraco.Core.Models
{
/// <summary>
/// Extension methods for IDocument
/// </summary>
public static class DocumentExtensions
{
/// <summary>
/// Returns the property based on the case insensitive match of the alias
/// </summary>
/// <param name="d"></param>
/// <param name="alias"></param>
/// <returns></returns>
public static IDocumentProperty GetProperty(this IDocument d, string alias)
{
return d.Properties.FirstOrDefault(p => p.Alias.InvariantEquals(alias));
}
}
}

View File

@@ -31,7 +31,6 @@ namespace Umbraco.Core.Models
Guid Version { get; }
int Level { get; }
Collection<IDocumentProperty> Properties { get; }
IEnumerable<IDocument> Children { get; }
IDocumentProperty GetProperty(string alias);
IEnumerable<IDocument> Children { get; }
}
}