Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0

This commit is contained in:
Shannon
2014-05-01 11:36:33 +10:00
33 changed files with 107 additions and 155 deletions

View File

@@ -323,7 +323,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
/// <param name="dd"> </param>
/// <param name="alias"></param>
/// <returns></returns>
private IPublishedProperty GetProperty(DictionaryPublishedContent dd, string alias)
private IPublishedContentProperty GetProperty(DictionaryPublishedContent dd, string alias)
{
//lets check if the alias does not exist on the document.
//NOTE: Examine will not index empty values and we do not output empty XML Elements to the cache - either of these situations
@@ -468,7 +468,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
IDictionary<string, string> valueDictionary,
Func<DictionaryPublishedContent, IPublishedContent> getParent,
Func<DictionaryPublishedContent, IEnumerable<IPublishedContent>> getChildren,
Func<DictionaryPublishedContent, string, IPublishedProperty> getProperty,
Func<DictionaryPublishedContent, string, IPublishedContentProperty> getProperty,
bool fromExamine)
{
if (valueDictionary == null) throw new ArgumentNullException("valueDictionary");
@@ -507,12 +507,12 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
}, "parentID");
_contentType = PublishedContentType.Get(PublishedItemType.Media, _documentTypeAlias);
_properties = new Collection<IPublishedProperty>();
_properties = new Collection<IPublishedContentProperty>();
//loop through remaining values that haven't been applied
foreach (var i in valueDictionary.Where(x => !_keysAdded.Contains(x.Key)))
{
IPublishedProperty property;
IPublishedContentProperty property;
// must ignore that one
if (i.Key == "version" || i.Key == "isDoc") continue;
@@ -578,7 +578,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private readonly Func<DictionaryPublishedContent, IPublishedContent> _getParent;
private readonly Func<DictionaryPublishedContent, IEnumerable<IPublishedContent>> _getChildren;
private readonly Func<DictionaryPublishedContent, string, IPublishedProperty> _getProperty;
private readonly Func<DictionaryPublishedContent, string, IPublishedContentProperty> _getProperty;
/// <summary>
/// Returns 'Media' as the item type
@@ -683,7 +683,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
get { return false; }
}
public override ICollection<IPublishedProperty> Properties
public override ICollection<IPublishedContentProperty> Properties
{
get { return _properties; }
}
@@ -693,7 +693,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
get { return _getChildren(this); }
}
public override IPublishedProperty GetProperty(string alias)
public override IPublishedContentProperty GetProperty(string alias)
{
return _getProperty(this, alias);
}
@@ -706,11 +706,11 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// override to implement cache
// cache at context level, ie once for the whole request
// but cache is not shared by requests because we wouldn't know how to clear it
public override IPublishedProperty GetProperty(string alias, bool recurse)
public override IPublishedContentProperty GetProperty(string alias, bool recurse)
{
if (recurse == false) return GetProperty(alias);
IPublishedProperty property;
IPublishedContentProperty property;
string key = null;
var cache = UmbracoContextCache.Current;
@@ -720,7 +720,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
object o;
if (cache.TryGetValue(key, out o))
{
property = o as IPublishedProperty;
property = o as IPublishedContentProperty;
if (property == null)
throw new InvalidOperationException("Corrupted cache.");
return property;
@@ -753,7 +753,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
private DateTime _updateDate;
private Guid _version;
private int _level;
private readonly ICollection<IPublishedProperty> _properties;
private readonly ICollection<IPublishedContentProperty> _properties;
private readonly PublishedContentType _contentType;
private void ValidateAndSetProperty(IDictionary<string, string> valueDictionary, Action<string> setProperty, params string[] potentialKeys)