|
|
|
@ -9,40 +9,22 @@ namespace Volo.Abp.ProjectBuilding |
|
|
|
{ |
|
|
|
public TemplateInfo GetDefault() |
|
|
|
{ |
|
|
|
return Get(TemplateNames.Mvc); |
|
|
|
return Get(MvcApplicationTemplate.TemplateName); |
|
|
|
} |
|
|
|
|
|
|
|
public TemplateInfo Get(string name) |
|
|
|
{ |
|
|
|
switch (name) |
|
|
|
{ |
|
|
|
case TemplateNames.Mvc: |
|
|
|
case MvcApplicationTemplate.TemplateName: |
|
|
|
return new MvcApplicationTemplate(); |
|
|
|
case TemplateNames.MvcModule: |
|
|
|
case MvcModuleTemplate.TemplateName: |
|
|
|
return new MvcModuleTemplate(); |
|
|
|
case TemplateNames.Service: |
|
|
|
case ServiceTemplate.TemplateName: |
|
|
|
return new ServiceTemplate(); |
|
|
|
default: |
|
|
|
throw new Exception("There is no template found with given name: " + name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static class TemplateNames |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// "mvc".
|
|
|
|
/// </summary>
|
|
|
|
public const string Mvc = "mvc"; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// "mvcmodule".
|
|
|
|
/// </summary>
|
|
|
|
public const string MvcModule = "mvcmodule"; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// "service".
|
|
|
|
/// </summary>
|
|
|
|
public const string Service = "service"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |