| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Reflection;
- using JetBrains.Annotations;
- namespace Abp.Modules
- {
- /// <summary>
- /// Used to store all needed information for a module.
- /// </summary>
- public class AbpModuleInfo
- {
- /// <summary>
- /// The assembly which contains the module definition.
- /// </summary>
- public Assembly Assembly { get; }
- /// <summary>
- /// Type of the module.
- /// </summary>
- public Type Type { get; }
- /// <summary>
- /// Instance of the module.
- /// </summary>
- public AbpModule Instance { get; }
- /// <summary>
- /// Is this module loaded as a plugin.
- /// </summary>
- public bool IsLoadedAsPlugIn { get; }
- /// <summary>
- /// All dependent modules of this module.
- /// </summary>
- public List<AbpModuleInfo> Dependencies { get; }
- /// <summary>
- /// Creates a new AbpModuleInfo object.
- /// </summary>
- public AbpModuleInfo([NotNull] Type type, [NotNull] AbpModule instance, bool isLoadedAsPlugIn)
- {
- Check.NotNull(type, nameof(type));
- Check.NotNull(instance, nameof(instance));
- Type = type;
- Instance = instance;
- IsLoadedAsPlugIn = isLoadedAsPlugIn;
- Assembly = Type.GetTypeInfo().Assembly;
- Dependencies = new List<AbpModuleInfo>();
- }
- public override string ToString()
- {
- return Type.AssemblyQualifiedName ??
- Type.FullName;
- }
- }
- }
|