Cleans up legacy stylesheet code to wrap the new APIs better, creates a new OriginalPath property on IFile to track if the path has changed, updates FileRepository to deal with path's changing and automatically deal with renaming files. Adds new methods to IFileService: GetStylesheetsAtPath. Fixes up the stylesheet and stylesheet property editors to use the file names, gets tree syncing working nicely for them both even with files or properties are renamed. Updates stylesheet editors and controllers to use the new APIs

This commit is contained in:
Shannon
2015-01-15 11:49:32 +11:00
parent 5a6e63e8d4
commit 8abf6fc2b5
30 changed files with 341 additions and 464 deletions

View File

@@ -8,6 +8,13 @@ namespace Umbraco.Core
{
internal static class NameValueCollectionExtensions
{
public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this NameValueCollection nvc)
{
foreach (string key in nvc.AllKeys)
{
yield return new KeyValuePair<string, string>(key, nvc[key]);
}
}
public static bool ContainsKey(this NameValueCollection collection, string key)
{