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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user