Skip to content

Commit b61e9b0

Browse files
Remove PubTernal APIs (#22290)
Remove PubTernal APIs
1 parent b5105e7 commit b61e9b0

File tree

7 files changed

+12
-58
lines changed

7 files changed

+12
-58
lines changed

src/Localization/Localization/ref/Microsoft.Extensions.Localization.netcoreapp.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public ResourceLocationAttribute(string resourceLocation) { }
2828
}
2929
public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer
3030
{
31-
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.AssemblyWrapper resourceAssemblyWrapper, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
32-
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.IResourceStringProvider resourceStringProvider, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
3331
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
3432
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
3533
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
@@ -62,22 +60,3 @@ public RootNamespaceAttribute(string rootNamespace) { }
6260
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
6361
}
6462
}
65-
namespace Microsoft.Extensions.Localization.Internal
66-
{
67-
public partial class AssemblyWrapper
68-
{
69-
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
70-
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
71-
public virtual string FullName { get { throw null; } }
72-
public virtual System.IO.Stream? GetManifestResourceStream(string name) { throw null; }
73-
}
74-
public partial interface IResourceStringProvider
75-
{
76-
System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
77-
}
78-
public partial class ResourceManagerStringProvider : Microsoft.Extensions.Localization.Internal.IResourceStringProvider
79-
{
80-
public ResourceManagerStringProvider(Microsoft.Extensions.Localization.IResourceNamesCache resourceCache, System.Resources.ResourceManager resourceManager, System.Reflection.Assembly assembly, string baseName) { }
81-
public System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
82-
}
83-
}

src/Localization/Localization/ref/Microsoft.Extensions.Localization.netstandard2.0.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public ResourceLocationAttribute(string resourceLocation) { }
2828
}
2929
public partial class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer
3030
{
31-
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.AssemblyWrapper resourceAssemblyWrapper, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
32-
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, Microsoft.Extensions.Localization.Internal.IResourceStringProvider resourceStringProvider, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
3331
public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) { }
3432
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get { throw null; } }
3533
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
@@ -62,22 +60,3 @@ public RootNamespaceAttribute(string rootNamespace) { }
6260
public string RootNamespace { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
6361
}
6462
}
65-
namespace Microsoft.Extensions.Localization.Internal
66-
{
67-
public partial class AssemblyWrapper
68-
{
69-
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
70-
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
71-
public virtual string FullName { get { throw null; } }
72-
public virtual System.IO.Stream? GetManifestResourceStream(string name) { throw null; }
73-
}
74-
public partial interface IResourceStringProvider
75-
{
76-
System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
77-
}
78-
public partial class ResourceManagerStringProvider : Microsoft.Extensions.Localization.Internal.IResourceStringProvider
79-
{
80-
public ResourceManagerStringProvider(Microsoft.Extensions.Localization.IResourceNamesCache resourceCache, System.Resources.ResourceManager resourceManager, System.Reflection.Assembly assembly, string baseName) { }
81-
public System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
82-
}
83-
}

src/Localization/Localization/src/Internal/AssemblyWrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
using System.IO;
66
using System.Reflection;
77

8-
namespace Microsoft.Extensions.Localization.Internal
8+
namespace Microsoft.Extensions.Localization
99
{
1010
/// <summary>
1111
/// This API supports infrastructure and is not intended to be used
1212
/// directly from your code. This API may change or be removed in future releases.
1313
/// </summary>
14-
public class AssemblyWrapper
14+
internal class AssemblyWrapper
1515
{
1616
public AssemblyWrapper(Assembly assembly)
1717
{

src/Localization/Localization/src/Internal/IResourceStringProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
using System.Collections.Generic;
55
using System.Globalization;
66

7-
namespace Microsoft.Extensions.Localization.Internal
7+
namespace Microsoft.Extensions.Localization
88
{
99
/// <summary>
1010
/// This API supports infrastructure and is not intended to be used
1111
/// directly from your code. This API may change or be removed in future releases.
1212
/// </summary>
13-
public interface IResourceStringProvider
13+
internal interface IResourceStringProvider
1414
{
1515
IList<string>? GetAllResourceStrings(CultureInfo culture, bool throwOnMissing);
1616
}

src/Localization/Localization/src/Internal/ResourceManagerStringProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
using System.Reflection;
88
using System.Resources;
99

10-
namespace Microsoft.Extensions.Localization.Internal
10+
namespace Microsoft.Extensions.Localization
1111
{
1212
/// <summary>
1313
/// This API supports infrastructure and is not intended to be used
1414
/// directly from your code. This API may change or be removed in future releases.
1515
/// </summary>
16-
public class ResourceManagerStringProvider : IResourceStringProvider
16+
internal class ResourceManagerStringProvider : IResourceStringProvider
1717
{
1818
private readonly IResourceNamesCache _resourceNamesCache;
1919
private readonly ResourceManager _resourceManager;

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ public ResourceManagerStringLocalizer(
5353
/// <summary>
5454
/// Intended for testing purposes only.
5555
/// </summary>
56-
public ResourceManagerStringLocalizer(
56+
internal ResourceManagerStringLocalizer(
5757
ResourceManager resourceManager,
58-
#pragma warning disable PUB0001 // Pubternal type AssemblyWrapper in public API
5958
AssemblyWrapper resourceAssemblyWrapper,
60-
#pragma warning restore PUB0001 // Pubternal type AssemblyWrapper in public API
6159
string baseName,
6260
IResourceNamesCache resourceNamesCache,
6361
ILogger logger)
@@ -77,11 +75,9 @@ public ResourceManagerStringLocalizer(
7775
/// <summary>
7876
/// Intended for testing purposes only.
7977
/// </summary>
80-
public ResourceManagerStringLocalizer(
78+
internal ResourceManagerStringLocalizer(
8179
ResourceManager resourceManager,
82-
#pragma warning disable PUB0001 // Pubternal type IResourceStringProvider in public API
8380
IResourceStringProvider resourceStringProvider,
84-
#pragma warning restore PUB0001 // Pubternal type IResourceStringProvider in public API
8581
string baseName,
8682
IResourceNamesCache resourceNamesCache,
8783
ILogger logger)
@@ -180,7 +176,7 @@ protected IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures,
180176
}
181177

182178
/// <summary>
183-
/// Gets a resource string from the <see cref="_resourceManager"/> and returns <c>null</c> instead of
179+
/// Gets a resource string from a <see cref="ResourceManager"/> and returns <c>null</c> instead of
184180
/// throwing exceptions if a match isn't found.
185181
/// </summary>
186182
/// <param name="name">The name of the string resource.</param>

src/Localization/Localization/test/Microsoft.Extensions.Localization.Tests/ResourceManagerStringLocalizerTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private static int GetCultureInfoDepth(CultureInfo culture)
239239

240240
private ILogger Logger => new TestLoggerFactory(Sink, enabled: true).CreateLogger<ResourceManagerStringLocalizer>();
241241

242-
public class TestResourceManager : ResourceManager
242+
internal class TestResourceManager : ResourceManager
243243
{
244244
private AssemblyWrapper _assemblyWrapper;
245245

@@ -259,7 +259,7 @@ public TestResourceManager(string baseName, AssemblyWrapper assemblyWrapper)
259259
}
260260
}
261261

262-
public class TestResourceStringProvider : ResourceManagerStringProvider
262+
internal class TestResourceStringProvider : ResourceManagerStringProvider
263263
{
264264
public TestResourceStringProvider(
265265
IResourceNamesCache resourceCache,
@@ -271,7 +271,7 @@ public TestResourceStringProvider(
271271
}
272272
}
273273

274-
public class TestAssemblyWrapper : AssemblyWrapper
274+
internal class TestAssemblyWrapper : AssemblyWrapper
275275
{
276276
public TestAssemblyWrapper()
277277
: this(typeof(TestAssemblyWrapper))

0 commit comments

Comments
 (0)