/
IStringLocalizerFactory.cs
28 lines (24 loc) · 1.11 KB
/
IStringLocalizerFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.Extensions.Localization;
/// <summary>
/// Represents a factory that creates <see cref="IStringLocalizer"/> instances.
/// </summary>
public interface IStringLocalizerFactory
{
/// <summary>
/// Creates an <see cref="IStringLocalizer"/> using the <see cref="System.Reflection.Assembly"/> and
/// <see cref="Type.FullName"/> of the specified <see cref="Type"/>.
/// </summary>
/// <param name="resourceSource">The <see cref="Type"/>.</param>
/// <returns>The <see cref="IStringLocalizer"/>.</returns>
IStringLocalizer Create(Type resourceSource);
/// <summary>
/// Creates an <see cref="IStringLocalizer"/>.
/// </summary>
/// <param name="baseName">The base name of the resource to load strings from.</param>
/// <param name="location">The location to load resources from.</param>
/// <returns>The <see cref="IStringLocalizer"/>.</returns>
IStringLocalizer Create(string baseName, string location);
}