mirror of https://github.com/abpframework/abp.git
9 changed files with 59 additions and 15 deletions
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Abp.Localization |
||||
|
{ |
||||
|
public interface IInheritedResourceTypesProvider |
||||
|
{ |
||||
|
[NotNull] |
||||
|
Type[] GetInheritedModuleTypes(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.Localization |
||||
|
{ |
||||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] |
||||
|
public class InheritResourceAttribute : Attribute, IInheritedResourceTypesProvider |
||||
|
{ |
||||
|
public Type[] ResourceTypes { get; } |
||||
|
|
||||
|
public InheritResourceAttribute(params Type[] resourceTypes) |
||||
|
{ |
||||
|
ResourceTypes = resourceTypes ?? new Type[0]; |
||||
|
} |
||||
|
|
||||
|
public Type[] GetInheritedModuleTypes() |
||||
|
{ |
||||
|
return ResourceTypes; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue