Files

35 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Resources;
namespace XP.Common.Localization.Implementations
{
/// <summary>
/// 资源源条目,封装名称与 ResourceManager 的映射
/// Resource source entry, encapsulating the mapping between name and ResourceManager
/// </summary>
internal class ResourceSource
{
/// <summary>
/// 资源源唯一标识 | Resource source unique identifier
/// </summary>
public string Name { get; }
/// <summary>
/// .NET 资源管理器实例 | .NET ResourceManager instance
/// </summary>
public ResourceManager ResourceManager { get; }
/// <summary>
/// 构造函数 | Constructor
/// </summary>
/// <param name="name">资源源名称(如 "XP.Scan"| Resource source name (e.g. "XP.Scan")</param>
/// <param name="resourceManager">模块的 ResourceManager 实例 | Module's ResourceManager instance</param>
/// <exception cref="ArgumentNullException">当 name 或 resourceManager 为 null 时抛出 | Thrown when name or resourceManager is null</exception>
public ResourceSource(string name, ResourceManager resourceManager)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
ResourceManager = resourceManager ?? throw new ArgumentNullException(nameof(resourceManager));
}
}
}