mirror of https://github.com/abpframework/abp.git
62 changed files with 1382 additions and 1444 deletions
@ -1,9 +1,8 @@ |
|||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing |
namespace Volo.Abp.Studio.Analyzing; |
||||
|
|
||||
|
public class AbpStudioAnalyzingAbstractionsModule : AbpModule |
||||
{ |
{ |
||||
public class AbpStudioAnalyzingAbstractionsModule : AbpModule |
|
||||
{ |
} |
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|||||
@ -1,21 +1,20 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Application |
namespace Volo.Abp.Studio.Analyzing.Models.Application; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class ApplicationServiceModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "applicationService"; |
||||
public class ApplicationServiceModel : PackageContentItemModel |
|
||||
|
public string Namespace { get; set; } |
||||
|
|
||||
|
public string Summary { get; set; } |
||||
|
|
||||
|
public List<string> ImplementingInterfaces { get; set; } |
||||
|
|
||||
|
public ApplicationServiceModel([NotNull] string name) : base(name) |
||||
{ |
{ |
||||
public const string ContentTypeName = "applicationService"; |
|
||||
|
|
||||
public string Namespace { get; set; } |
|
||||
|
|
||||
public string Summary { get; set; } |
|
||||
|
|
||||
public List<string> ImplementingInterfaces { get; set; } |
|
||||
|
|
||||
public ApplicationServiceModel([NotNull] string name) : base(name) |
|
||||
{ |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,24 +1,23 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Authorization |
namespace Volo.Abp.Studio.Analyzing.Models.Authorization; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class PermissionModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "permission"; |
||||
public class PermissionModel : PackageContentItemModel |
|
||||
{ |
public string DisplayName { get; } |
||||
public const string ContentTypeName = "permission"; |
|
||||
|
|
||||
public string DisplayName { get; } |
public bool IsEnabled { get; } |
||||
|
|
||||
public bool IsEnabled { get; } |
public PermissionModel( |
||||
|
[NotNull] string name, |
||||
public PermissionModel( |
string displayName, |
||||
[NotNull] string name, |
bool isEnabled) |
||||
string displayName, |
: base(name) |
||||
bool isEnabled) |
{ |
||||
: base(name) |
DisplayName = displayName; |
||||
{ |
IsEnabled = isEnabled; |
||||
DisplayName = displayName; |
|
||||
IsEnabled = isEnabled; |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,17 +1,16 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Database |
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class DatabaseCollectionModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "databaseCollection"; |
||||
public class DatabaseCollectionModel : PackageContentItemModel |
|
||||
{ |
|
||||
public const string ContentTypeName = "databaseCollection"; |
|
||||
|
|
||||
public string EntityFullName { get; private set; } |
|
||||
|
|
||||
public DatabaseCollectionModel([NotNull] string name, string entityFullName) : base(name) |
public string EntityFullName { get; private set; } |
||||
{ |
|
||||
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
public DatabaseCollectionModel([NotNull] string name, string entityFullName) : base(name) |
||||
} |
{ |
||||
|
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,17 +1,16 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Database |
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class DatabaseTableModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "databaseTable"; |
||||
public class DatabaseTableModel : PackageContentItemModel |
|
||||
{ |
|
||||
public const string ContentTypeName = "databaseTable"; |
|
||||
|
|
||||
public string EntityFullName { get; private set; } |
|
||||
|
|
||||
public DatabaseTableModel([NotNull] string name, string entityFullName) : base(name) |
public string EntityFullName { get; private set; } |
||||
{ |
|
||||
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
public DatabaseTableModel([NotNull] string name, string entityFullName) : base(name) |
||||
} |
{ |
||||
|
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,25 +1,24 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Database |
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class EfCoreDbContextModel : PackageContentItemModel, IDbContextModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "efCoreDbContext"; |
||||
public class EfCoreDbContextModel : PackageContentItemModel, IDbContextModel |
|
||||
{ |
|
||||
public const string ContentTypeName = "efCoreDbContext"; |
|
||||
|
|
||||
public string Namespace { get; private set; } |
public string Namespace { get; private set; } |
||||
|
|
||||
public string ConnectionStringName { get; set; } |
public string ConnectionStringName { get; set; } |
||||
|
|
||||
public List<DatabaseTableModel> DatabaseTables { get; set; } |
public List<DatabaseTableModel> DatabaseTables { get; set; } |
||||
|
|
||||
public EfCoreDbContextModel( |
public EfCoreDbContextModel( |
||||
[NotNull] string name, |
[NotNull] string name, |
||||
[NotNull] string @namespace |
[NotNull] string @namespace |
||||
) : base(name) |
) : base(name) |
||||
{ |
{ |
||||
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace)); |
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace)); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,7 +1,6 @@ |
|||||
namespace Volo.Abp.Studio.Analyzing.Models.Database |
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
||||
|
|
||||
|
public interface IDbContextModel |
||||
{ |
{ |
||||
public interface IDbContextModel |
string ConnectionStringName { get; set; } |
||||
{ |
} |
||||
string ConnectionStringName { get; set; } |
|
||||
} |
|
||||
} |
|
||||
|
|||||
@ -1,25 +1,24 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Database |
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class MongoDbContextModel : PackageContentItemModel, IDbContextModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "mongoDbContext"; |
||||
public class MongoDbContextModel : PackageContentItemModel, IDbContextModel |
|
||||
{ |
|
||||
public const string ContentTypeName = "mongoDbContext"; |
|
||||
|
|
||||
public string Namespace { get; private set; } |
public string Namespace { get; private set; } |
||||
|
|
||||
public string ConnectionStringName { get; set; } |
public string ConnectionStringName { get; set; } |
||||
|
|
||||
public List<DatabaseCollectionModel> DatabaseCollections { get; set; } |
public List<DatabaseCollectionModel> DatabaseCollections { get; set; } |
||||
|
|
||||
public MongoDbContextModel( |
public MongoDbContextModel( |
||||
[NotNull] string name, |
[NotNull] string name, |
||||
[NotNull] string @namespace |
[NotNull] string @namespace |
||||
) : base(name) |
) : base(name) |
||||
{ |
{ |
||||
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace)); |
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace)); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,11 @@ |
|||||
namespace Volo.Abp.Studio.Analyzing.Models.Domain |
namespace Volo.Abp.Studio.Analyzing.Models.Domain; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class AggregateRootModel : EntityModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public new const string ContentTypeName = "aggregateRoot"; |
||||
public class AggregateRootModel : EntityModel |
|
||||
{ |
|
||||
public new const string ContentTypeName = "aggregateRoot"; |
|
||||
|
|
||||
public AggregateRootModel(string name) : base(name) |
public AggregateRootModel(string name) : base(name) |
||||
{ |
{ |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,18 +1,17 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Domain |
namespace Volo.Abp.Studio.Analyzing.Models.Domain; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class DomainServiceModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "domainService"; |
||||
public class DomainServiceModel : PackageContentItemModel |
|
||||
{ |
public string Namespace { get; set; } |
||||
public const string ContentTypeName = "domainService"; |
|
||||
|
|
||||
public string Namespace { get; set; } |
|
||||
|
|
||||
public string Summary { get; set; } |
|
||||
|
|
||||
public DomainServiceModel([NotNull] string name) : base(name) |
public string Summary { get; set; } |
||||
{ |
|
||||
} |
public DomainServiceModel([NotNull] string name) : base(name) |
||||
|
{ |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,25 +1,24 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Domain |
namespace Volo.Abp.Studio.Analyzing.Models.Domain; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class EntityModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "entity"; |
||||
public class EntityModel : PackageContentItemModel |
|
||||
{ |
public string Namespace { get; set; } |
||||
public const string ContentTypeName = "entity"; |
|
||||
|
public string PrimaryKeyType { get; set; } |
||||
public string Namespace { get; set; } |
|
||||
|
|
||||
public string PrimaryKeyType { get; set; } |
|
||||
|
|
||||
public string Summary { get; set; } |
|
||||
|
|
||||
public List<string> CollectionProperties { get; set; } |
|
||||
public List<string> NavigationProperties { get; set; } |
|
||||
|
|
||||
public EntityModel(string name) : base(name) |
public string Summary { get; set; } |
||||
{ |
|
||||
CollectionProperties = new List<string>(); |
public List<string> CollectionProperties { get; set; } |
||||
NavigationProperties = new List<string>(); |
public List<string> NavigationProperties { get; set; } |
||||
} |
|
||||
|
public EntityModel(string name) : base(name) |
||||
|
{ |
||||
|
CollectionProperties = new List<string>(); |
||||
|
NavigationProperties = new List<string>(); |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,20 +1,19 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Domain |
namespace Volo.Abp.Studio.Analyzing.Models.Domain; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class RepositoryInterfaceModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "repositoryInterface"; |
||||
public class RepositoryInterfaceModel : PackageContentItemModel |
|
||||
{ |
public string Namespace { get; set; } |
||||
public const string ContentTypeName = "repositoryInterface"; |
|
||||
|
|
||||
public string Namespace { get; set; } |
public string Summary { get; set; } |
||||
|
|
||||
public string Summary { get; set; } |
public EntityModel EntityModel { get; set; } |
||||
|
|
||||
public EntityModel EntityModel { get; set; } |
public RepositoryInterfaceModel([NotNull] string name) : base(name) |
||||
|
{ |
||||
public RepositoryInterfaceModel([NotNull] string name) : base(name) |
|
||||
{ |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,40 +1,39 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Feature |
namespace Volo.Abp.Studio.Analyzing.Models.Feature; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class FeatureModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "feature"; |
||||
public class FeatureModel : PackageContentItemModel |
|
||||
|
public string ValueType { get; } |
||||
|
|
||||
|
public string DefaultValue { get; } |
||||
|
|
||||
|
public string DisplayName { get; } |
||||
|
|
||||
|
public string Description { get; } |
||||
|
|
||||
|
public bool IsAvailableToHost { get; } |
||||
|
|
||||
|
public bool IsVisibleToClients { get; } |
||||
|
|
||||
|
public FeatureModel( |
||||
|
[NotNull] string name, |
||||
|
[NotNull] string valueType, |
||||
|
string defaultValue, |
||||
|
string displayName, |
||||
|
string description, |
||||
|
bool isAvailableToHost, |
||||
|
bool isVisibleToClients |
||||
|
) : base(name) |
||||
{ |
{ |
||||
public const string ContentTypeName = "feature"; |
ValueType = valueType; |
||||
|
DefaultValue = defaultValue; |
||||
public string ValueType { get; } |
DisplayName = displayName; |
||||
|
Description = description; |
||||
public string DefaultValue { get; } |
IsAvailableToHost = isAvailableToHost; |
||||
|
IsVisibleToClients = isVisibleToClients; |
||||
public string DisplayName { get; } |
|
||||
|
|
||||
public string Description { get; } |
|
||||
|
|
||||
public bool IsAvailableToHost { get; } |
|
||||
|
|
||||
public bool IsVisibleToClients { get; } |
|
||||
|
|
||||
public FeatureModel( |
|
||||
[NotNull] string name, |
|
||||
[NotNull] string valueType, |
|
||||
string defaultValue, |
|
||||
string displayName, |
|
||||
string description, |
|
||||
bool isAvailableToHost, |
|
||||
bool isVisibleToClients |
|
||||
) : base(name) |
|
||||
{ |
|
||||
ValueType = valueType; |
|
||||
DefaultValue = defaultValue; |
|
||||
DisplayName = displayName; |
|
||||
Description = description; |
|
||||
IsAvailableToHost = isAvailableToHost; |
|
||||
IsVisibleToClients = isVisibleToClients; |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,16 +1,15 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Module |
namespace Volo.Abp.Studio.Analyzing.Models.Module; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class AbpModuleModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "abpModule"; |
||||
public class AbpModuleModel : PackageContentItemModel |
|
||||
|
public string Namespace { get; set; } |
||||
|
|
||||
|
public AbpModuleModel([NotNull] string name) : base(name) |
||||
{ |
{ |
||||
public const string ContentTypeName = "abpModule"; |
|
||||
|
|
||||
public string Namespace { get; set; } |
|
||||
|
|
||||
public AbpModuleModel([NotNull] string name) : base(name) |
|
||||
{ |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,16 +1,15 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models |
namespace Volo.Abp.Studio.Analyzing.Models; |
||||
|
|
||||
|
public abstract class PackageContentItemModel |
||||
{ |
{ |
||||
public abstract class PackageContentItemModel |
public string ContentType { get; } |
||||
|
public string Name { get; } |
||||
|
|
||||
|
public PackageContentItemModel([NotNull] string name) |
||||
{ |
{ |
||||
public string ContentType { get; } |
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
||||
public string Name { get; } |
ContentType = PackageContentItemNameAttribute.GetName(GetType()); |
||||
|
|
||||
public PackageContentItemModel([NotNull] string name) |
|
||||
{ |
|
||||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|
||||
ContentType = PackageContentItemNameAttribute.GetName(GetType()); |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,26 +1,25 @@ |
|||||
using System; |
using System; |
||||
using Volo.Abp.Reflection; |
using Volo.Abp.Reflection; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models |
namespace Volo.Abp.Studio.Analyzing.Models; |
||||
|
|
||||
|
public class PackageContentItemNameAttribute : Attribute |
||||
{ |
{ |
||||
public class PackageContentItemNameAttribute : Attribute |
public string Name { get; } |
||||
|
|
||||
|
public PackageContentItemNameAttribute(string name) |
||||
{ |
{ |
||||
public string Name { get; } |
Name = name; |
||||
|
} |
||||
|
|
||||
public PackageContentItemNameAttribute(string name) |
public static string GetName(Type type) |
||||
|
{ |
||||
|
var attribute = ReflectionHelper.GetSingleAttributeOrDefault<PackageContentItemNameAttribute>(type); |
||||
|
if (attribute == null) |
||||
{ |
{ |
||||
Name = name; |
throw new ApplicationException($"Given type {type.FullName} must have an {nameof(PackageContentItemNameAttribute)}, but not defined!"); |
||||
} |
} |
||||
|
|
||||
public static string GetName(Type type) |
|
||||
{ |
|
||||
var attribute = ReflectionHelper.GetSingleAttributeOrDefault<PackageContentItemNameAttribute>(type); |
|
||||
if (attribute == null) |
|
||||
{ |
|
||||
throw new ApplicationException($"Given type {type.FullName} must have an {nameof(PackageContentItemNameAttribute)}, but not defined!"); |
|
||||
} |
|
||||
|
|
||||
return attribute.Name; |
return attribute.Name; |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models |
namespace Volo.Abp.Studio.Analyzing.Models; |
||||
|
|
||||
|
public class PackageContentList : List<PackageContentItemModel> |
||||
{ |
{ |
||||
public class PackageContentList : List<PackageContentItemModel> |
|
||||
{ |
} |
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|||||
@ -1,20 +1,19 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models |
namespace Volo.Abp.Studio.Analyzing.Models; |
||||
|
|
||||
|
public class PackageModel |
||||
{ |
{ |
||||
public class PackageModel |
public string Name { get; } |
||||
{ |
|
||||
public string Name { get; } |
|
||||
|
|
||||
public string Hash { get; } |
public string Hash { get; } |
||||
|
|
||||
public PackageContentList Contents { get; } |
|
||||
|
|
||||
public PackageModel([NotNull] string name, [NotNull] string hash) |
public PackageContentList Contents { get; } |
||||
{ |
|
||||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
public PackageModel([NotNull] string name, [NotNull] string hash) |
||||
Contents = new PackageContentList(); |
{ |
||||
Hash = hash; |
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
||||
} |
Contents = new PackageContentList(); |
||||
|
Hash = hash; |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,26 +1,25 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing.Models.Setting |
namespace Volo.Abp.Studio.Analyzing.Models.Setting; |
||||
|
|
||||
|
[PackageContentItemName(ContentTypeName)] |
||||
|
public class SettingModel : PackageContentItemModel |
||||
{ |
{ |
||||
[PackageContentItemName(ContentTypeName)] |
public const string ContentTypeName = "setting"; |
||||
public class SettingModel : PackageContentItemModel |
|
||||
{ |
|
||||
public const string ContentTypeName = "setting"; |
|
||||
|
|
||||
public string DefaultValue { get; set; } |
public string DefaultValue { get; set; } |
||||
|
|
||||
public string DisplayName { get; set; } |
public string DisplayName { get; set; } |
||||
|
|
||||
public string Description { get; set; } |
public string Description { get; set; } |
||||
|
|
||||
public bool IsVisibleToClient { get; set; } |
public bool IsVisibleToClient { get; set; } |
||||
|
|
||||
public bool IsInherited { get; set; } |
public bool IsInherited { get; set; } |
||||
|
|
||||
public bool IsEncrypted { get; set; } |
public bool IsEncrypted { get; set; } |
||||
|
|
||||
public SettingModel([NotNull] string name) : base(name) |
public SettingModel([NotNull] string name) : base(name) |
||||
{ |
{ |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,11 +1,10 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.Packages.Modifying |
namespace Volo.Abp.Studio.Packages.Modifying; |
||||
|
|
||||
|
public interface IAbpModuleFileManager |
||||
{ |
{ |
||||
public interface IAbpModuleFileManager |
Task AddDependency(string filePath, string moduleToAdd); |
||||
{ |
|
||||
Task AddDependency(string filePath, string moduleToAdd); |
|
||||
|
|
||||
Task<string> ExtractModuleNameWithNamespace(string filePath); |
Task<string> ExtractModuleNameWithNamespace(string filePath); |
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,18 +1,17 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.Nuget |
namespace Volo.Abp.Studio.Nuget; |
||||
|
|
||||
|
public interface INugetSourceCodeStore |
||||
{ |
{ |
||||
public interface INugetSourceCodeStore |
Task<string> GetCachedSourceCodeFilePathAsync(string name, |
||||
{ |
string type, |
||||
Task<string> GetCachedSourceCodeFilePathAsync(string name, |
string version = null, |
||||
string type, |
bool includePreReleases = false); |
||||
string version = null, |
|
||||
bool includePreReleases = false); |
|
||||
|
|
||||
Task<string> GetCachedDllFilePathAsync(string name, |
Task<string> GetCachedDllFilePathAsync(string name, |
||||
string type, |
string type, |
||||
string version = null, |
string version = null, |
||||
bool includePreReleases = false, |
bool includePreReleases = false, |
||||
bool includeDependencies = false); |
bool includeDependencies = false); |
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,18 +1,17 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.Nuget |
namespace Volo.Abp.Studio.Nuget; |
||||
|
|
||||
|
public static class TemplateNugetPackageInfoProvider |
||||
{ |
{ |
||||
public static class TemplateNugetPackageInfoProvider |
public static string GetNugetPackageName(string template) |
||||
{ |
{ |
||||
public static string GetNugetPackageName(string template) |
switch (template) |
||||
{ |
{ |
||||
switch (template) |
case "app": |
||||
{ |
return "Cotur.Abp.Basic.Template"; // todo: replace with real template!
|
||||
case "app": |
default: |
||||
return "Cotur.Abp.Basic.Template"; // todo: replace with real template!
|
return null; |
||||
default: |
|
||||
return null; |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,30 +1,29 @@ |
|||||
using System; |
using System; |
||||
using System.IO; |
using System.IO; |
||||
|
|
||||
namespace Volo.Abp.Studio.Package |
namespace Volo.Abp.Studio.Package; |
||||
|
|
||||
|
public class PackageDependency |
||||
{ |
{ |
||||
public class PackageDependency |
public ReferenceType Type { get; } |
||||
{ |
|
||||
public ReferenceType Type { get; } |
|
||||
|
|
||||
public string Name { get; } |
public string Name { get; } |
||||
|
|
||||
public string Version { get; } |
public string Version { get; } |
||||
|
|
||||
public string Path { get; } |
public string Path { get; } |
||||
|
|
||||
public PackageDependency(string name, string version) |
public PackageDependency(string name, string version) |
||||
{ |
{ |
||||
Type = ReferenceType.Package; |
Type = ReferenceType.Package; |
||||
Name = name; |
Name = name; |
||||
Version = version; |
Version = version; |
||||
} |
} |
||||
|
|
||||
public PackageDependency(string path) |
public PackageDependency(string path) |
||||
{ |
{ |
||||
Type = ReferenceType.Project; |
Type = ReferenceType.Project; |
||||
Path = path; |
Path = path; |
||||
Name = System.IO.Path.GetFileName(path).RemovePostFix(".csproj"); |
Name = System.IO.Path.GetFileName(path).RemovePostFix(".csproj"); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,8 +1,7 @@ |
|||||
namespace Volo.Abp.Studio.Package |
namespace Volo.Abp.Studio.Package; |
||||
|
|
||||
|
public enum ReferenceType |
||||
{ |
{ |
||||
public enum ReferenceType |
Project = 1, |
||||
{ |
Package = 2 |
||||
Project = 1, |
} |
||||
Package = 2 |
|
||||
} |
|
||||
} |
|
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.Solution |
namespace Volo.Abp.Studio.Solution; |
||||
|
|
||||
|
public interface IDotnetSlnFileModifierService |
||||
{ |
{ |
||||
public interface IDotnetSlnFileModifierService |
Task AddProjectAsync(string slnFile, string projectPath, string slnTargetFolder = "src"); |
||||
{ |
|
||||
Task AddProjectAsync(string slnFile, string projectPath, string slnTargetFolder = "src"); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.Solution |
namespace Volo.Abp.Studio.Solution; |
||||
|
|
||||
|
public interface ISolutionFileModuleAdder |
||||
{ |
{ |
||||
public interface ISolutionFileModuleAdder |
Task AddAsync(string TargetModule, string ModuleName); |
||||
{ |
|
||||
Task AddAsync(string TargetModule, string ModuleName); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,13 +1,12 @@ |
|||||
using Volo.Abp.Cli; |
using Volo.Abp.Cli; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace Volo.Abp.Studio |
namespace Volo.Abp.Studio; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpCliCoreModule) |
||||
|
)] |
||||
|
public class AbpStudioDomainSharedModule : AbpModule |
||||
{ |
{ |
||||
[DependsOn( |
|
||||
typeof(AbpCliCoreModule) |
|
||||
)] |
|
||||
public class AbpStudioDomainSharedModule : AbpModule |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,32 +1,31 @@ |
|||||
namespace Volo.Abp.Studio |
namespace Volo.Abp.Studio; |
||||
|
|
||||
|
public static class AbpStudioErrorCodes |
||||
{ |
{ |
||||
public static class AbpStudioErrorCodes |
public const string SolutionAlreadyExists = "AbpStudio:SolutionAlreadyExists"; |
||||
{ |
public const string ModuleAlreadyExistsInTheSolution = "AbpStudio:ModuleAlreadyExistsInTheSolution"; |
||||
public const string SolutionAlreadyExists = "AbpStudio:SolutionAlreadyExists"; |
public const string ModuleFileAlreadyExists = "AbpStudio:ModuleFileAlreadyExists"; |
||||
public const string ModuleAlreadyExistsInTheSolution = "AbpStudio:ModuleAlreadyExistsInTheSolution"; |
public const string IncorrectFileFormat = "AbpStudio:IncorrectFileFormat"; |
||||
public const string ModuleFileAlreadyExists = "AbpStudio:ModuleFileAlreadyExists"; |
public const string ModuleNotFound = "AbpStudio:ModuleNotFound"; |
||||
public const string IncorrectFileFormat = "AbpStudio:IncorrectFileFormat"; |
public const string SolutionNotFound = "AbpStudio:SolutionNotFound"; |
||||
public const string ModuleNotFound = "AbpStudio:ModuleNotFound"; |
public const string ModuleNotSpecified = "AbpStudio:ModuleNotSpecified"; |
||||
public const string SolutionNotFound = "AbpStudio:SolutionNotFound"; |
public const string SolutionNotSpecified = "AbpStudio:SolutionNotSpecified"; |
||||
public const string ModuleNotSpecified = "AbpStudio:ModuleNotSpecified"; |
public const string ProjectAlreadyExistInTheModule = "AbpStudio:ProjectAlreadyExistInTheModule"; |
||||
public const string SolutionNotSpecified = "AbpStudio:SolutionNotSpecified"; |
public const string IncorrectSolutionFileFormat = "AbpStudio:IncorrectSolutionFileFormat"; |
||||
public const string ProjectAlreadyExistInTheModule = "AbpStudio:ProjectAlreadyExistInTheModule"; |
public const string FolderNotFound = "AbpStudio:FolderNotFound"; |
||||
public const string IncorrectSolutionFileFormat = "AbpStudio:IncorrectSolutionFileFormat"; |
public const string ProjectWithSameNameAlreadyExistInTheSolutionFile = "AbpStudio:ProjectWithSameNameAlreadyExistInTheSolutionFile"; |
||||
public const string FolderNotFound = "AbpStudio:FolderNotFound"; |
public const string UndefinedPackageTemplate = "AbpStudio:UndefinedPackageTemplate"; |
||||
public const string ProjectWithSameNameAlreadyExistInTheSolutionFile = "AbpStudio:ProjectWithSameNameAlreadyExistInTheSolutionFile"; |
public const string PackageTemplateNotSpecified = "AbpStudio:PackageTemplateNotSpecified"; |
||||
public const string UndefinedPackageTemplate = "AbpStudio:UndefinedPackageTemplate"; |
public const string PackageNameMustBeSpecified = "AbpStudio:PackageNameMustBeSpecified"; |
||||
public const string PackageTemplateNotSpecified = "AbpStudio:PackageTemplateNotSpecified"; |
public const string FileAlreadyExists = "AbpStudio:FileAlreadyExists"; |
||||
public const string PackageNameMustBeSpecified = "AbpStudio:PackageNameMustBeSpecified"; |
public const string PackageNotSpecified = "AbpStudio:PackageNotSpecified"; |
||||
public const string FileAlreadyExists = "AbpStudio:FileAlreadyExists"; |
public const string DbmsMustBeSpecified = "AbpStudio:DbmsMustBeSpecified"; |
||||
public const string PackageNotSpecified = "AbpStudio:PackageNotSpecified"; |
public const string UserNotLoggedIn = "AbpStudio:UserNotLoggedIn"; |
||||
public const string DbmsMustBeSpecified = "AbpStudio:DbmsMustBeSpecified"; |
public const string PackageAlreadyExist = "AbpStudio:PackageAlreadyExist"; |
||||
public const string UserNotLoggedIn = "AbpStudio:UserNotLoggedIn"; |
public const string AbpModuleFileNotFound = "AbpStudio:AbpModuleFileNotFound"; |
||||
public const string PackageAlreadyExist = "AbpStudio:PackageAlreadyExist"; |
public const string DllNotFound = "AbpStudio:DllNotFound"; |
||||
public const string AbpModuleFileNotFound = "AbpStudio:AbpModuleFileNotFound"; |
public const string PackageNotFound = "AbpStudio:PackageNotFound"; |
||||
public const string DllNotFound = "AbpStudio:DllNotFound"; |
public const string FileNotFound = "AbpStudio:FileNotFound"; |
||||
public const string PackageNotFound = "AbpStudio:PackageNotFound"; |
public const string IncorrectFolderName = "AbpStudio:IncorrectFolderName"; |
||||
public const string FileNotFound = "AbpStudio:FileNotFound"; |
public const string ModuleAlreadyInstalled = "AbpStudio:ModuleAlreadyInstalled"; |
||||
public const string IncorrectFolderName = "AbpStudio:IncorrectFolderName"; |
|
||||
public const string ModuleAlreadyInstalled = "AbpStudio:ModuleAlreadyInstalled"; |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,18 +1,17 @@ |
|||||
namespace Volo.Abp.Studio.Modules |
namespace Volo.Abp.Studio.Modules; |
||||
|
|
||||
|
public static class ModuleConsts |
||||
{ |
{ |
||||
public static class ModuleConsts |
public const string FileExtension = ".abpmdl.json"; |
||||
{ |
public const string InstallerPackagePostfix = ".Installer"; |
||||
public const string FileExtension = ".abpmdl.json"; |
public const string SourceCorePackagePostfix = ".SourceCode"; |
||||
public const string InstallerPackagePostfix = ".Installer"; |
public const string Packages = "packages"; |
||||
public const string SourceCorePackagePostfix = ".SourceCode"; |
|
||||
public const string Packages = "packages"; |
|
||||
|
|
||||
public static class Layers //TODO: Moving to PackageTypes
|
public static class Layers //TODO: Moving to PackageTypes
|
||||
{ |
{ |
||||
public const string Domain = "lib.domain"; |
public const string Domain = "lib.domain"; |
||||
public const string DomainShared = "lib.domain.shared"; |
public const string DomainShared = "lib.domain.shared"; |
||||
public const string Application = "lib.application"; |
public const string Application = "lib.application"; |
||||
public const string ApplicationContracts = "lib.application.contracts"; |
public const string ApplicationContracts = "lib.application.contracts"; |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,13 +1,12 @@ |
|||||
namespace Volo.Abp.Studio.Packages.Referencing |
namespace Volo.Abp.Studio.Packages.Referencing; |
||||
|
|
||||
|
public enum PackageReferenceCompatibility |
||||
{ |
{ |
||||
public enum PackageReferenceCompatibility |
Unknown, |
||||
{ |
DDD_Compatible, |
||||
Unknown, |
Compatible, |
||||
DDD_Compatible, |
TestProject, |
||||
Compatible, |
IndirectlyReferenced, |
||||
TestProject, |
DirectlyReferenced, |
||||
IndirectlyReferenced, |
CircularReference |
||||
DirectlyReferenced, |
|
||||
CircularReference |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,13 +1,12 @@ |
|||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
using Volo.Abp.Studio.Analyzing; |
using Volo.Abp.Studio.Analyzing; |
||||
|
|
||||
namespace Volo.Abp.Studio |
namespace Volo.Abp.Studio; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpStudioAnalyzingAbstractionsModule) |
||||
|
)] |
||||
|
public class AbpStudioModuleInstallerAbstractionsModule : AbpModule |
||||
{ |
{ |
||||
[DependsOn( |
|
||||
typeof(AbpStudioAnalyzingAbstractionsModule) |
|
||||
)] |
|
||||
public class AbpStudioModuleInstallerAbstractionsModule : AbpModule |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,45 +1,44 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.Analyzing |
namespace Volo.Abp.Studio.Analyzing; |
||||
|
|
||||
|
public class AnalyzingOptions |
||||
{ |
{ |
||||
public class AnalyzingOptions |
public bool Force { get; set; } = false; |
||||
|
|
||||
|
[CanBeNull] |
||||
|
public string AnalyzeConfigurationFile { get; set; } |
||||
|
|
||||
|
[CanBeNull] |
||||
|
public string SettingNamePrefix { get; set; } |
||||
|
|
||||
|
[CanBeNull] |
||||
|
public string FeatureNamePrefix { get; set; } |
||||
|
|
||||
|
// Combines two options
|
||||
|
// The second option has more priority
|
||||
|
public static AnalyzingOptions Combine([CanBeNull] AnalyzingOptions first, [CanBeNull] AnalyzingOptions second) |
||||
{ |
{ |
||||
public bool Force { get; set; } = false; |
if (second == null && first == null) |
||||
|
|
||||
[CanBeNull] |
|
||||
public string AnalyzeConfigurationFile { get; set; } |
|
||||
|
|
||||
[CanBeNull] |
|
||||
public string SettingNamePrefix { get; set; } |
|
||||
|
|
||||
[CanBeNull] |
|
||||
public string FeatureNamePrefix { get; set; } |
|
||||
|
|
||||
// Combines two options
|
|
||||
// The second option has more priority
|
|
||||
public static AnalyzingOptions Combine([CanBeNull] AnalyzingOptions first, [CanBeNull] AnalyzingOptions second) |
|
||||
{ |
{ |
||||
if (second == null && first == null) |
return new AnalyzingOptions(); |
||||
{ |
|
||||
return new AnalyzingOptions(); |
|
||||
} |
|
||||
|
|
||||
if (second == null) |
|
||||
{ |
|
||||
return first; |
|
||||
} |
|
||||
|
|
||||
if (first == null) |
|
||||
{ |
|
||||
return second; |
|
||||
} |
|
||||
|
|
||||
return new AnalyzingOptions |
|
||||
{ |
|
||||
AnalyzeConfigurationFile = second.AnalyzeConfigurationFile ?? first.AnalyzeConfigurationFile, |
|
||||
SettingNamePrefix = second.SettingNamePrefix ?? first.SettingNamePrefix, |
|
||||
FeatureNamePrefix = second.FeatureNamePrefix ?? first.FeatureNamePrefix |
|
||||
}; |
|
||||
} |
} |
||||
|
|
||||
|
if (second == null) |
||||
|
{ |
||||
|
return first; |
||||
|
} |
||||
|
|
||||
|
if (first == null) |
||||
|
{ |
||||
|
return second; |
||||
|
} |
||||
|
|
||||
|
return new AnalyzingOptions |
||||
|
{ |
||||
|
AnalyzeConfigurationFile = second.AnalyzeConfigurationFile ?? first.AnalyzeConfigurationFile, |
||||
|
SettingNamePrefix = second.SettingNamePrefix ?? first.SettingNamePrefix, |
||||
|
FeatureNamePrefix = second.FeatureNamePrefix ?? first.FeatureNamePrefix |
||||
|
}; |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,18 +1,17 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling |
namespace Volo.Abp.Studio.ModuleInstalling; |
||||
{ |
|
||||
public class EfCoreConfigurationMethodDeclaration |
|
||||
{ |
|
||||
public string Namespace { get; } |
|
||||
|
|
||||
public string MethodName { get; } |
public class EfCoreConfigurationMethodDeclaration |
||||
|
{ |
||||
|
public string Namespace { get; } |
||||
|
|
||||
public EfCoreConfigurationMethodDeclaration([NotNull] string nameSpace, [NotNull] string methodName) |
public string MethodName { get; } |
||||
{ |
|
||||
Namespace = Check.NotNullOrEmpty(nameSpace, nameof(nameSpace)); |
|
||||
MethodName = Check.NotNullOrEmpty(methodName, nameof(methodName)); |
|
||||
} |
|
||||
|
|
||||
|
public EfCoreConfigurationMethodDeclaration([NotNull] string nameSpace, [NotNull] string methodName) |
||||
|
{ |
||||
|
Namespace = Check.NotNullOrEmpty(nameSpace, nameof(nameSpace)); |
||||
|
MethodName = Check.NotNullOrEmpty(methodName, nameof(methodName)); |
||||
} |
} |
||||
|
|
||||
} |
} |
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling |
namespace Volo.Abp.Studio.ModuleInstalling; |
||||
|
|
||||
|
public interface IModuleInstallingPipelineBuilder |
||||
{ |
{ |
||||
public interface IModuleInstallingPipelineBuilder |
Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context); |
||||
{ |
|
||||
Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling |
namespace Volo.Abp.Studio.ModuleInstalling; |
||||
|
|
||||
|
public abstract class ModuleInstallingPipelineStep |
||||
{ |
{ |
||||
public abstract class ModuleInstallingPipelineStep |
public abstract Task ExecuteAsync(ModuleInstallingContext context); |
||||
{ |
|
||||
public abstract Task ExecuteAsync(ModuleInstallingContext context); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,10 +1,9 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling.Options |
namespace Volo.Abp.Studio.ModuleInstalling.Options; |
||||
|
|
||||
|
public interface IModuleInstallingOptionProvider |
||||
{ |
{ |
||||
public interface IModuleInstallingOptionProvider |
Task<List<ModuleInstallingOption>> GetAsync(); |
||||
{ |
|
||||
Task<List<ModuleInstallingOption>> GetAsync(); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,28 +1,27 @@ |
|||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling.Options |
namespace Volo.Abp.Studio.ModuleInstalling.Options; |
||||
|
|
||||
|
public class ModuleInstallingOption |
||||
{ |
{ |
||||
public class ModuleInstallingOption |
public string Name { get; set; } |
||||
{ |
|
||||
public string Name { get; set; } |
|
||||
|
|
||||
public string Description { get; set; } |
public string Description { get; set; } |
||||
|
|
||||
public ModuleInstallingOptionType Type { get; set; } |
public ModuleInstallingOptionType Type { get; set; } |
||||
|
|
||||
public Dictionary<string, string> Values { get; set; } |
public Dictionary<string, string> Values { get; set; } |
||||
|
|
||||
public ModuleInstallingOption( |
public ModuleInstallingOption( |
||||
[NotNull] string name, |
[NotNull] string name, |
||||
[NotNull] string description, |
[NotNull] string description, |
||||
[NotNull] ModuleInstallingOptionType type, |
[NotNull] ModuleInstallingOptionType type, |
||||
[CanBeNull] Dictionary<string, string> values = null) |
[CanBeNull] Dictionary<string, string> values = null) |
||||
{ |
{ |
||||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
||||
Description = Check.NotNullOrWhiteSpace(description, nameof(description)); |
Description = Check.NotNullOrWhiteSpace(description, nameof(description)); |
||||
Type = type; |
Type = type; |
||||
Values = values ?? new Dictionary<string, string>(); |
Values = values ?? new Dictionary<string, string>(); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,10 +1,9 @@ |
|||||
namespace Volo.Abp.Studio.ModuleInstalling.Options |
namespace Volo.Abp.Studio.ModuleInstalling.Options; |
||||
|
|
||||
|
public enum ModuleInstallingOptionType |
||||
{ |
{ |
||||
public enum ModuleInstallingOptionType |
NotSpecified, |
||||
{ |
Checkbox, |
||||
NotSpecified, |
FreeText, |
||||
Checkbox, |
ComboBox |
||||
FreeText, |
} |
||||
ComboBox |
|
||||
} |
|
||||
} |
|
||||
|
|||||
@ -1,9 +1,8 @@ |
|||||
namespace Volo.Abp.Studio.Packages |
namespace Volo.Abp.Studio.Packages; |
||||
|
|
||||
|
public static class PackageConsts |
||||
{ |
{ |
||||
public static class PackageConsts |
public const string FileExtension = ".abppkg.json"; |
||||
{ |
|
||||
public const string FileExtension = ".abppkg.json"; |
|
||||
|
|
||||
public const string RoleProperty = "role"; |
public const string RoleProperty = "role"; |
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -1,27 +1,26 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
using Volo.Abp.Studio.Analyzing; |
using Volo.Abp.Studio.Analyzing; |
||||
|
|
||||
namespace Volo.Abp.Studio.Packages |
namespace Volo.Abp.Studio.Packages; |
||||
|
|
||||
|
public class PackageInfo |
||||
{ |
{ |
||||
public class PackageInfo |
[NotNull] |
||||
{ |
public string Path { get; } |
||||
[NotNull] |
|
||||
public string Path { get; } |
[NotNull] |
||||
|
public string Name { get; } |
||||
[NotNull] |
|
||||
public string Name { get; } |
|
||||
|
|
||||
[CanBeNull] |
|
||||
public string Role { get; } |
|
||||
|
|
||||
[CanBeNull] |
|
||||
public AnalyzingOptions AnalyzingOptions { get; set; } |
|
||||
|
|
||||
public PackageInfo([NotNull] string path, [CanBeNull] string role) |
[CanBeNull] |
||||
{ |
public string Role { get; } |
||||
Path = Check.NotNullOrWhiteSpace(path, nameof(path)); |
|
||||
Name = PackageHelper.GetNameFromPath(path); |
[CanBeNull] |
||||
Role = role; |
public AnalyzingOptions AnalyzingOptions { get; set; } |
||||
} |
|
||||
|
public PackageInfo([NotNull] string path, [CanBeNull] string role) |
||||
|
{ |
||||
|
Path = Check.NotNullOrWhiteSpace(path, nameof(path)); |
||||
|
Name = PackageHelper.GetNameFromPath(path); |
||||
|
Role = role; |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,28 +1,27 @@ |
|||||
using JetBrains.Annotations; |
using JetBrains.Annotations; |
||||
using Volo.Abp.Studio.Analyzing.Models; |
using Volo.Abp.Studio.Analyzing.Models; |
||||
|
|
||||
namespace Volo.Abp.Studio.Packages |
namespace Volo.Abp.Studio.Packages; |
||||
|
|
||||
|
public class PackageInfoWithAnalyze |
||||
{ |
{ |
||||
public class PackageInfoWithAnalyze |
[NotNull] |
||||
{ |
public string Path { get; } |
||||
[NotNull] |
|
||||
public string Path { get; } |
|
||||
|
|
||||
[NotNull] |
[NotNull] |
||||
public string Name { get; } |
public string Name { get; } |
||||
|
|
||||
[CanBeNull] |
[CanBeNull] |
||||
public string Role { get; } |
public string Role { get; } |
||||
|
|
||||
[NotNull] |
[NotNull] |
||||
public PackageModel Analyze { get; } |
public PackageModel Analyze { get; } |
||||
|
|
||||
public PackageInfoWithAnalyze([NotNull] string path, [CanBeNull] string role, [NotNull] PackageModel analyze) |
public PackageInfoWithAnalyze([NotNull] string path, [CanBeNull] string role, [NotNull] PackageModel analyze) |
||||
{ |
{ |
||||
Path = Check.NotNullOrWhiteSpace(path, nameof(path)); |
Path = Check.NotNullOrWhiteSpace(path, nameof(path)); |
||||
Name = PackageHelper.GetNameFromPath(path); |
Name = PackageHelper.GetNameFromPath(path); |
||||
Role = role; |
Role = role; |
||||
Analyze = Check.NotNull(analyze, nameof(analyze)); |
Analyze = Check.NotNull(analyze, nameof(analyze)); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,16 +1,15 @@ |
|||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace Volo.Abp.Studio |
namespace Volo.Abp.Studio; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpStudioDomainCommonServicesModule), |
||||
|
typeof(AbpStudioModuleInstallerAbstractionsModule) |
||||
|
)] |
||||
|
public class AbpStudioModuleInstallerModule : AbpModule |
||||
{ |
{ |
||||
[DependsOn( |
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
typeof(AbpStudioDomainCommonServicesModule), |
|
||||
typeof(AbpStudioModuleInstallerAbstractionsModule) |
|
||||
)] |
|
||||
public class AbpStudioModuleInstallerModule : AbpModule |
|
||||
{ |
{ |
||||
public override void ConfigureServices(ServiceConfigurationContext context) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,32 +1,31 @@ |
|||||
using System.Linq; |
using System.Linq; |
||||
using Volo.Abp.Studio.ModuleInstalling.Steps; |
using Volo.Abp.Studio.ModuleInstalling.Steps; |
||||
|
|
||||
namespace Volo.Abp.Studio.ModuleInstalling |
namespace Volo.Abp.Studio.ModuleInstalling; |
||||
|
|
||||
|
public abstract class ModuleInstallingPipelineBuilderBase |
||||
{ |
{ |
||||
public abstract class ModuleInstallingPipelineBuilderBase |
protected ModuleInstallingPipeline GetBasePipeline(ModuleInstallingContext context) |
||||
{ |
{ |
||||
protected ModuleInstallingPipeline GetBasePipeline(ModuleInstallingContext context) |
var pipeline = new ModuleInstallingPipeline(context); |
||||
|
|
||||
|
if (context.WithSourceCode) |
||||
{ |
{ |
||||
var pipeline = new ModuleInstallingPipeline(context); |
pipeline.Add(new SourceCodeDownloadStep()); |
||||
|
|
||||
if (context.WithSourceCode) |
if (context.AddToSolutionFile) |
||||
{ |
{ |
||||
pipeline.Add(new SourceCodeDownloadStep()); |
pipeline.Add(new AddToSolutionFileStep()); |
||||
|
|
||||
if (context.AddToSolutionFile) |
|
||||
{ |
|
||||
pipeline.Add(new AddToSolutionFileStep()); |
|
||||
} |
|
||||
} |
} |
||||
|
} |
||||
|
|
||||
pipeline.Add(new PackageReferencingStep()); |
pipeline.Add(new PackageReferencingStep()); |
||||
|
|
||||
if (context.EfCoreConfigurationMethodDeclarations.Any()) |
if (context.EfCoreConfigurationMethodDeclarations.Any()) |
||||
{ |
{ |
||||
pipeline.Add(new AddEfCoreConfigurationMethodStep()); |
pipeline.Add(new AddEfCoreConfigurationMethodStep()); |
||||
} |
|
||||
|
|
||||
return pipeline; |
|
||||
} |
} |
||||
|
|
||||
|
return pipeline; |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue