WIP - moving tree and section service implementations to Web because they are web based and they need web based objects, there's no sense in coying all of the non-web objects to Core. Now we need to use IoC for the ServiceContext
This commit is contained in:
34
src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs
Normal file
34
src/Umbraco.Web/Models/Trees/ApplicationAttribute.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies an application tree
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
|
||||
public class ApplicationAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApplicationAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="alias">The alias.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="icon">The icon.</param>
|
||||
/// <param name="sortOrder">The sort order.</param>
|
||||
public ApplicationAttribute(string alias,
|
||||
string name,
|
||||
string icon,
|
||||
int sortOrder = 0)
|
||||
{
|
||||
Alias = alias;
|
||||
Name = name;
|
||||
Icon = icon;
|
||||
SortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public string Alias { get; private set; }
|
||||
public string Name { get; private set; }
|
||||
public string Icon { get; private set; }
|
||||
public int SortOrder { get; private set; }
|
||||
}
|
||||
}
|
||||
37
src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs
Normal file
37
src/Umbraco.Web/Models/Trees/ApplicationDefinitions.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
// The application definitions are intended as a means to auto populate
|
||||
// the application.config. On app startup, Umbraco will look for any
|
||||
// unregistered classes with an ApplicationAttribute and add them to the cache
|
||||
|
||||
[Application(Constants.Applications.Content, "Content", ".traycontent")]
|
||||
public class ContentApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Media, "Media", ".traymedia", sortOrder: 1)]
|
||||
public class MediaApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Settings, "Settings", ".traysettings", sortOrder: 2)]
|
||||
public class SettingsApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Developer, "Developer", ".traydeveloper", sortOrder: 3)]
|
||||
public class DeveloperApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Users, "Users", ".trayusers", sortOrder: 4)]
|
||||
public class UsersApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Members, "Members", ".traymember", sortOrder: 5)]
|
||||
public class MembersApplicationDefinition : IApplication
|
||||
{ }
|
||||
|
||||
[Application(Constants.Applications.Translation, "Translation", ".traytranslation", sortOrder: 6)]
|
||||
public class TranslationApplicationDefinition : IApplication
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user