Mark static provider methods as obsolete
The `BuildStaticClient` and `Create` methods in the `ReC.Client` namespace have been marked with the `[Obsolete]` attribute. These methods now include a message advising developers to use a local service collection instead of the static provider. This change serves as a warning that these methods are outdated and may be removed in future versions, encouraging a transition to a more modern design.
This commit is contained in:
parent
5f9e716ca6
commit
4a7f2a41fa
@ -78,6 +78,7 @@ namespace ReC.Client
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="apiUri">The base URI of the ReC API.</param>
|
/// <param name="apiUri">The base URI of the ReC API.</param>
|
||||||
/// <exception cref="InvalidOperationException">Thrown if the static provider has already been built.</exception>
|
/// <exception cref="InvalidOperationException">Thrown if the static provider has already been built.</exception>
|
||||||
|
[Obsolete("Use a local service collection instead of the static provider.")]
|
||||||
public static void BuildStaticClient(string apiUri)
|
public static void BuildStaticClient(string apiUri)
|
||||||
{
|
{
|
||||||
if(Provider != null)
|
if(Provider != null)
|
||||||
@ -95,6 +96,7 @@ namespace ReC.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A new instance of the <see cref="ReCClient"/>.</returns>
|
/// <returns>A new instance of the <see cref="ReCClient"/>.</returns>
|
||||||
/// <exception cref="InvalidOperationException">Thrown if <see cref="BuildStaticClient(string)"/> has not been called yet.</exception>
|
/// <exception cref="InvalidOperationException">Thrown if <see cref="BuildStaticClient(string)"/> has not been called yet.</exception>
|
||||||
|
[Obsolete("Use a local service collection instead of the static provider.")]
|
||||||
public static ReCClient Create()
|
public static ReCClient Create()
|
||||||
{
|
{
|
||||||
if (Provider == null)
|
if (Provider == null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user